Class: CreateEnterpriseAccounts

Inherits:
Object
  • Object
show all
Defined in:
lib/osso/db/migrate/20200411192645_create_enterprise_accounts.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/osso/db/migrate/20200411192645_create_enterprise_accounts.rb', line 2

def change
  create_table :enterprise_accounts, id: :uuid do |t|
    t.string  :domain, null: false
    t.uuid :external_uuid
    t.integer :external_int_id
    t.string :external_id
  end

  add_index :enterprise_accounts, :domain, unique: true

  add_reference :identity_providers, :enterprise_account, type: :uuid, index: true    
  add_reference :users, :enterprise_account, type: :uuid, index: true
end