1
0
Fork 0

Merge migrations

This commit is contained in:
Alex Kotov 2019-07-20 05:40:21 +05:00
parent 54f64b7f29
commit 85c4a0f80b
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 3 additions and 7 deletions

View file

@ -11,6 +11,8 @@ class DeviseCreateUsers < ActiveRecord::Migration[5.2]
t.string :guest_token, null: false
t.references :person, index: { unique: true }
t.index :guest_token, unique: true
end
@ -100,5 +102,6 @@ class DeviseCreateUsers < ActiveRecord::Migration[5.2]
add_foreign_key :users, :accounts
add_foreign_key :account_roles, :accounts
add_foreign_key :account_roles, :roles
add_foreign_key :accounts, :people
end
end

View file

@ -1,7 +0,0 @@
# frozen_string_literal: true
class AddPersonToAccounts < ActiveRecord::Migration[5.2]
def change
add_reference :accounts, :person, index: { unique: true }, foreign_key: true
end
end