demarches-normaliennes/db/migrate/20220622183305_backfill_add_opendata_to_procedures.rb
Christophe Robillard ea59f5f260 add opendata boolean attribute for procedure
when opendata is set to true, it means that descriptive's procedure can be
public
when opendata is set to false, ti means that descriptive's can not be
public, because the procedure is only available for public servants, not
citizens.
2022-06-23 14:11:09 +02:00

10 lines
226 B
Ruby

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