From f14f7e0f0e3ceb6aefbebf4fcbcecf223dcb13db Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sat, 15 Feb 2020 21:17:13 -0600 Subject: skip already backfilled statuses --- db/migrate/20200215021014_backfill_statuses_hidden.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db/migrate') diff --git a/db/migrate/20200215021014_backfill_statuses_hidden.rb b/db/migrate/20200215021014_backfill_statuses_hidden.rb index 59e2e40ac..34042e204 100644 --- a/db/migrate/20200215021014_backfill_statuses_hidden.rb +++ b/db/migrate/20200215021014_backfill_statuses_hidden.rb @@ -3,6 +3,6 @@ class BackfillStatusesHidden < ActiveRecord::Migration[5.2] def change Rails.logger.info("Setting all statuses unhidden by default. This may take a really long time.") - Status.in_batches.update_all(hidden: false) + Status.where.not(hidden: false).in_batches.update_all(hidden: false) end end -- cgit