From 585aa16ec01cbabb1b29fec9e0995b6c95f97533 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 732ddf8259..429cb45349 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