Gab-Social/db/migrate/20190721234917_backfill_add_unread_count_to_group_accounts.rb

11 lines
235 B
Ruby

class BackfillAddUnreadCountToGroupAccounts < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def change
GroupAccount.in_batches do |relation|
relation.update_all unread_count: 0
sleep(0.1)
end
end
end