From e428e320b6207d02a4b5055bda1ca52a23fdd97d Mon Sep 17 00:00:00 2001 From: ThibG Date: Sun, 9 Jun 2019 22:55:28 +0200 Subject: [PATCH] Fix old migrations failing because of new version of `strong_migrations` (#11018) --- db/migrate/20180402040909_create_report_notes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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