Gab-Social/db/migrate/20201203213059_backfill_add_unread_count_to_chat_conversation_accounts.rb
mgabdev 137a36b810 Progress with DMs
Progress with DMs
2020-12-03 17:13:11 -05:00

10 lines
257 B
Ruby

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