about summary refs log tree commit diff
path: root/db/migrate/20200215021014_backfill_statuses_hidden.rb
blob: 34042e2042a39a0da6425d0df7249761085f50fb (plain) (blame)
1
2
3
4
5
6
7
8
class BackfillStatusesHidden < ActiveRecord::Migration[5.2]
  disable_ddl_transaction!

  def change
    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
end