From: ThibG Date: Sun, 9 Jun 2019 20:55:28 +0000 (+0200) Subject: Fix old migrations failing because of new version of `strong_migrations` (#11018) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=e428e320b6207d02a4b5055bda1ca52a23fdd97d;p=mastodon.git Fix old migrations failing because of new version of `strong_migrations` (#11018) --- diff --git a/db/migrate/20180402040909_create_report_notes.rb b/db/migrate/20180402040909_create_report_notes.rb index 732ddf825..429cb4534 100644 --- a/db/migrate/20180402040909_create_report_notes.rb +++ b/db/migrate/20180402040909_create_report_notes.rb @@ -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