demarches-normaliennes/db/migrate/20220622183305_backfill_add_opendata_to_procedures.rb
2024-08-22 09:26:48 +02:00

12 lines
257 B
Ruby

# frozen_string_literal: true
class BackfillAddOpendataToProcedures < ActiveRecord::Migration[6.1]
disable_ddl_transaction!
def change
Procedure.in_batches do |relation|
relation.update_all opendata: true
sleep(0.01)
end
end
end