Merge pull request #7868 from mfo/US/fix-migration-backfill
fix(migration): backfill max_duree_conservation_dossiers_dans_ds with…
This commit is contained in:
commit
5a6dddc6d5
1 changed files with 10 additions and 0 deletions
|
@ -0,0 +1,10 @@
|
|||
class ReBackfillProcedureMaxDureeConservationDossiers < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
Procedure.where(duree_conservation_etendue_par_ds: true).in_batches do |batch|
|
||||
batch.update_all(max_duree_conservation_dossiers_dans_ds: Procedure::OLD_MAX_DUREE_CONSERVATION)
|
||||
end
|
||||
Procedure.where(duree_conservation_etendue_par_ds: false).in_batches do |batch|
|
||||
batch.update_all(max_duree_conservation_dossiers_dans_ds: Procedure::NEW_MAX_DUREE_CONSERVATION)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue