Browse Source

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

ThibG 2 weeks ago
parent
commit
1c78d600d3

+ 1
- 1
db/migrate/20171005102658_create_account_moderation_notes.rb View File

@@ -8,6 +8,6 @@ class CreateAccountModerationNotes < ActiveRecord::Migration[5.1]
8 8
       t.timestamps
9 9
     end
10 10
 
11
-    add_foreign_key :account_moderation_notes, :accounts, column: :target_account_id
11
+    safety_assured { add_foreign_key :account_moderation_notes, :accounts, column: :target_account_id }
12 12
   end
13 13
 end

+ 1
- 1
db/migrate/20171010023049_add_foreign_key_to_account_moderation_notes.rb View File

@@ -1,5 +1,5 @@
1 1
 class AddForeignKeyToAccountModerationNotes < ActiveRecord::Migration[5.1]
2 2
   def change
3
-    add_foreign_key :account_moderation_notes, :accounts
3
+    safety_assured { add_foreign_key :account_moderation_notes, :accounts }
4 4
   end
5 5
 end

+ 1
- 1
db/migrate/20171118012443_add_moved_to_account_id_to_accounts.rb View File

@@ -1,6 +1,6 @@
1 1
 class AddMovedToAccountIdToAccounts < ActiveRecord::Migration[5.1]
2 2
   def change
3 3
     add_column :accounts, :moved_to_account_id, :bigint, null: true, default: nil
4
-    add_foreign_key :accounts, :accounts, column: :moved_to_account_id, on_delete: :nullify
4
+    safety_assured { add_foreign_key :accounts, :accounts, column: :moved_to_account_id, on_delete: :nullify }
5 5
   end
6 6
 end

Loading…
Cancel
Save