demarches-normaliennes/db/migrate/20220712141945_backfill_assign_tos_manager.rb

13 lines
249 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class BackfillAssignTosManager < ActiveRecord::Migration[6.1]
disable_ddl_transaction!
def change
AssignTo.in_batches do |relation|
relation.update_all manager: false
sleep(0.01)
end
end
end