Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaffold CLI to support Postgresql array and JSON types #1249

Open
rnice01 opened this issue Feb 21, 2021 · 1 comment
Open

Scaffold CLI to support Postgresql array and JSON types #1249

rnice01 opened this issue Feb 21, 2021 · 1 comment

Comments

@rnice01
Copy link

rnice01 commented Feb 21, 2021

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

@eliasjpr
Copy link
Contributor

We will be open please follow up with a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants