diff --git a/app/jobs/migration/remove_message_notifications.rb b/app/jobs/migration/remove_message_notifications.rb index df4de54c5..7075257e9 100644 --- a/app/jobs/migration/remove_message_notifications.rb +++ b/app/jobs/migration/remove_message_notifications.rb @@ -3,6 +3,6 @@ class Migration::RemoveMessageNotifications < ApplicationJob queue_as :scheduled_jobs def perform - Notification.where(primary_actor_type: 'Message').in_batches(of: 100).each_record(&:destroy) + Notification.where(primary_actor_type: 'Message').in_batches(of: 100).delete_all end end