Files
fixin.me/db/migrate/20230309185340_create_users.rb
T
cryptogopher b6d2c19b0b Auto-create check constraints for text fields with limit
Move column defaults from migration strategy to migrations.
Compact index creation inside migrations.
Disable database schema generation.
2026-11-26 02:32:09 +01:00

11 lines
251 B
Ruby

class CreateUsers < ActiveRecord::Migration[8.1]
def change
create_table :users do |t|
t.string :email, null: false, limit: 2**6, index: {unique: true}
t.integer :status, null: false, default: 0
t.timestamps
end
end
end