Module: MigrationHelpers::Shared::AccountStructure
- Defined in:
- lib/migrate/shared/account_structure.rb
Instance Method Summary collapse
Instance Method Details
#create_table_lesli_shared_account_10(engine) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/migrate/shared/account_structure.rb', line 5 def create_table_lesli_shared_account_10(engine) table_name, table_name_account = table_name_for_shared(engine, :accounts) create_table table_name do |t| t.string :name t.integer :status, null: false, default: 0 t.datetime :enabled_at t.datetime :deleted_at, index: true t. end add_reference(table_name, :account, null: false, foreign_key: { to_table: :lesli_accounts }, index: true) end |