Fix old migrations failing because of new version of `strong_migrations` (#10904)

master
ThibG 5 years ago committed by Eugen Rochko
parent acc74bed12
commit 1c78d600d3
  1. 2
      db/migrate/20171005102658_create_account_moderation_notes.rb
  2. 2
      db/migrate/20171010023049_add_foreign_key_to_account_moderation_notes.rb
  3. 2
      db/migrate/20171118012443_add_moved_to_account_id_to_accounts.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

@ -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

@ -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

Loading…
Cancel
Save