Merge migrations
This commit is contained in:
parent
54f64b7f29
commit
85c4a0f80b
2 changed files with 3 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
Reference in a new issue