Skip to content

Commit

Permalink
Fix old migrations failing because of new version of `strong_migratio…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and Gargron committed May 30, 2019
1 parent acc74be commit 1c78d60
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ def change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1c78d60

Please sign in to comment.