Sha256: bf59465f4dbc42b7d11135b9d70e84ebffe58c74c6dd6d3132363d8fabba068a

Contents?: true

Size: 901 Bytes

Versions: 45

Compression:

Stored size: 901 Bytes

Contents

class CreateEcomCoreUsers < ActiveRecord::Migration[6.0]
  def change
    create_table :ecom_core_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.jsonb :projects

      t.timestamps
    end

    create_table :ecom_core_application_modules_users, id: false do |t|
      t.references :user,
                   null: false,
                   index: false,
                   foreign_key: { to_table: :ecom_core_users }
      t.references :application_module,
                   null: false,
                   index: false,
                   foreign_key: { to_table: :ecom_core_application_modules }
    end

    add_index :ecom_core_application_modules_users, %i[user_id application_module_id], name: 'am_on_users_indx'
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
ecom_core-1.2.31 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.30 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.29 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.28 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.27 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.26 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.25 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.24 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.23 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.22 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.21 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.20 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.19 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.18 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.17 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.16 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.15 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.14 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.13 db/migrate/20191202220832_create_ecom_core_users.rb
ecom_core-1.2.12 db/migrate/20191202220832_create_ecom_core_users.rb