diff options
author | ThibG <thib@sitedethib.com> | 2019-05-30 21:35:29 +0200 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-11-19 16:18:08 -0600 |
commit | 413ec98035e74c4cdc971895fdbcb537fa822914 (patch) | |
tree | 8ca26cf99aaa5bce235305df95fa7e5dc7215b5d /db/migrate | |
parent | 4b1840f4e232a023e8e42c84d10b57fb850b9f90 (diff) |
Fix old migrations failing because of new version of `strong_migrations` (#10904)
Diffstat (limited to 'db/migrate')
3 files changed, 3 insertions, 3 deletions
diff --git a/db/migrate/20171005102658_create_account_moderation_notes.rb b/db/migrate/20171005102658_create_account_moderation_notes.rb index 974ed9940..010b94586 100644 --- a/db/migrate/20171005102658_create_account_moderation_notes.rb +++ b/db/migrate/20171005102658_create_account_moderation_notes.rb @@ -8,6 +8,6 @@ class CreateAccountModerationNotes < ActiveRecord::Migration[5.1] t.timestamps end - add_foreign_key :account_moderation_notes, :accounts, column: :target_account_id + safety_assured { add_foreign_key :account_moderation_notes, :accounts, column: :target_account_id } end end diff --git a/db/migrate/20171010023049_add_foreign_key_to_account_moderation_notes.rb b/db/migrate/20171010023049_add_foreign_key_to_account_moderation_notes.rb index fc1e1ab91..cdcd15934 100644 --- a/db/migrate/20171010023049_add_foreign_key_to_account_moderation_notes.rb +++ b/db/migrate/20171010023049_add_foreign_key_to_account_moderation_notes.rb @@ -1,5 +1,5 @@ class AddForeignKeyToAccountModerationNotes < ActiveRecord::Migration[5.1] def change - add_foreign_key :account_moderation_notes, :accounts + safety_assured { add_foreign_key :account_moderation_notes, :accounts } end end diff --git a/db/migrate/20171118012443_add_moved_to_account_id_to_accounts.rb b/db/migrate/20171118012443_add_moved_to_account_id_to_accounts.rb index 0c8a894cc..586ef6f02 100644 --- a/db/migrate/20171118012443_add_moved_to_account_id_to_accounts.rb +++ b/db/migrate/20171118012443_add_moved_to_account_id_to_accounts.rb @@ -1,6 +1,6 @@ class AddMovedToAccountIdToAccounts < ActiveRecord::Migration[5.1] def change add_column :accounts, :moved_to_account_id, :bigint, null: true, default: nil - add_foreign_key :accounts, :accounts, column: :moved_to_account_id, on_delete: :nullify + safety_assured { add_foreign_key :accounts, :accounts, column: :moved_to_account_id, on_delete: :nullify } end end |