We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Right now (er, once #201 is merged), regardless of the name of the migration, it just gets created as an empty migration:
ROM::SQL.migration do # Add your migration here. # # See https://sequel.jeremyevans.net/rdoc/files/doc/migration_rdoc.html for details. end
We should be a little bit smarter than that, and if someone does hanami generate migration create_books, it should create something like this:
hanami generate migration create_books
ROM::SQL.migration do change do create_table :books do primary_key :id end end # Reference https://sequel.jeremyevans.net/rdoc/files/doc/migration_rdoc.html end
And, going further we could also support something lke: hanami generate migration create_books name description quantity:int:
hanami generate migration create_books name description quantity:int
ROM::SQL.migration do change do create_table :books do primary_key :id String :name String :description Integer :quantity end end # Reference https://sequel.jeremyevans.net/rdoc/files/doc/migration_rdoc.html end
And we could later expand to things like name:not_null, but let's not be too ambitious with this first enhancement
name:not_null
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Right now (er, once #201 is merged), regardless of the name of the migration, it just gets created as an empty migration:
We should be a little bit smarter than that, and if someone does
hanami generate migration create_books
, it should create something like this:And, going further we could also support something lke:
hanami generate migration create_books name description quantity:int
:And we could later expand to things like
name:not_null
, but let's not be too ambitious with this first enhancementThe text was updated successfully, but these errors were encountered: