]> cat aescling's git repositories - mastodon.git/commitdiff
Fix old migrations failing because of new version of `strong_migrations` (#11018)
authorThibG <thib@sitedethib.com>
Sun, 9 Jun 2019 20:55:28 +0000 (22:55 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 9 Jun 2019 20:55:28 +0000 (22:55 +0200)
db/migrate/20180402040909_create_report_notes.rb

index 732ddf8259cb8d1168a8ac8ee6cc32a6b91b5c92..429cb453495d015e84074f74b165d9b06b30a0ac 100644 (file)
@@ -8,7 +8,7 @@ class CreateReportNotes < ActiveRecord::Migration[5.1]
       t.timestamps
     end
 
-    add_foreign_key :report_notes, :reports, column: :report_id, on_delete: :cascade
-    add_foreign_key :report_notes, :accounts, column: :account_id, on_delete: :cascade
+    safety_assured { add_foreign_key :report_notes, :reports, column: :report_id, on_delete: :cascade }
+    safety_assured { add_foreign_key :report_notes, :accounts, column: :account_id, on_delete: :cascade }
   end
 end