From 0cdc3d57f69667419c8ae9f55cca1a84c484d686 Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Sat, 14 Oct 2023 18:47:13 +0000 Subject: [PATCH] Avoid issue with renamed field in migration --- ...231013194621_remove_old_unconfirmed_alerts_and_comments.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/migrate/20231013194621_remove_old_unconfirmed_alerts_and_comments.rb b/db/migrate/20231013194621_remove_old_unconfirmed_alerts_and_comments.rb index 9791fb638..8e23779e5 100644 --- a/db/migrate/20231013194621_remove_old_unconfirmed_alerts_and_comments.rb +++ b/db/migrate/20231013194621_remove_old_unconfirmed_alerts_and_comments.rb @@ -1,7 +1,9 @@ class RemoveOldUnconfirmedAlertsAndComments < ActiveRecord::Migration[7.0] def up Alert.where(confirmed: false).destroy_all - Comment.where("confirmed IS NULL OR confirmed = false").destroy_all + Comment.skip_counter_culture_updates do + Comment.where("confirmed IS NULL OR confirmed = false").destroy_all + end end def down