From 511cfcc3b71ce26862d74d74c89891f3c8a35507 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sun, 16 Feb 2020 00:25:40 -0600 Subject: (monsterpit specific) make backfill redo-able --- db/migrate/20200215021014_backfill_statuses_hidden.rb | 6 +++++- 1 file changed, 5 insertions(+), 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 34042e204..bd90b9b97 100644 --- a/db/migrate/20200215021014_backfill_statuses_hidden.rb +++ b/db/migrate/20200215021014_backfill_statuses_hidden.rb @@ -1,8 +1,12 @@ class BackfillStatusesHidden < ActiveRecord::Migration[5.2] disable_ddl_transaction! - def change + def up Rails.logger.info("Setting all statuses unhidden by default. This may take a really long time.") Status.where.not(hidden: false).in_batches.update_all(hidden: false) end + + def down + true + end end -- cgit