Sha256: 3a4d224d7938212dd6db2ca2d99c1b00cb7b84e583117a2a71349cb6fb1efc2b
Contents?: true
Size: 876 Bytes
Versions: 5
Compression:
Stored size: 876 Bytes
Contents
class CreateEcomModelUsers < ActiveRecord::Migration[6.0] def change create_table :ecom_model_users do |t| t.string :first_name, null: false t.string :last_name, null: false t.string :email, null: false t.boolean :active, null: false, default: true t.string :password_digest t.timestamps end create_table :ecom_model_application_modules_users, id: false do |t| t.references :user, index: false t.references :application_module, index: false end add_index :ecom_model_application_modules_users, %i[user_id application_module_id], name: 'am_on_users_indx' add_foreign_key :ecom_model_application_modules_users, :ecom_model_users, column: :user_id add_foreign_key :ecom_model_application_modules_users, :ecom_model_application_modules, column: :application_module_id end end
Version data entries
5 entries across 5 versions & 1 rubygems