amber
amber copied to clipboard
Scaffold CLI to support Postgresql array and JSON types
Description
Are you guys open to having the scaffolding CLI support Postgresql specific types? It's easy enough to change the generated files as of now, but this might be a nice quality of life feature?
Example amber g scaffold Vocab expression:string meanings:array:string would produce the following migration and model.
CREATE TABLE vocabs (
id BIGSERIAL PRIMARY KEY,
expression VARCHAR,
meanings VARCHAR[]
class Vocab < Granite::Base
connection pg
table vocabs
column id : Int64, primary: true
column expression : String?
column meanings : Array(String)
timestamps
end
We will be open please follow up with a PR