Replies: 1 comment
-
If you are dumping to the same database type, you can pass the create_table(:users) do
column :id, "varchar(255)", default: Sequel::LiteralString.new("shortid('U')"), null: false
column :display_name, "varchar(255)", null: false
column :encrypted_email, "BLOB", null: false
column :keyring_id, "INTEGER", null: false
column :email_digest, "TEXT", null: false
column :created_at, "timestamp", null: false
column :updated_at, "timestamp", null: false
foreign_key :space_id, :spaces, type: "varchar(255)"
primary_key [:id]
index [:email_digest], unique: true
end |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the
schema_dumper
extension and noticed that it doesn't apply default values when using function calls. For instance, this is my migration definition:After calling
connection.dump_schema_migration
, this is the generated dump:Inspecting the schema on SQLite, this is what's being emitted:
Is there a way to include function calls? It seems this is quite trivial (at least the common cases) to be inferred from the column's default value.
Beta Was this translation helpful? Give feedback.
All reactions