amelioration(data): backfill procedure_expires_when_termine_enabled:true pour les procedures ou c'est pas activé qui n'ont pas de dossiers
This commit is contained in:
parent
1716a931c5
commit
5bf38ea06f
1 changed files with 13 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
namespace :after_party do
|
||||
desc 'Deployment task: backfill_procedure_expires_when_termine_enabled_without_dossiers'
|
||||
task backfill_procedure_expires_when_termine_enabled_without_dossiers: :environment do
|
||||
puts "Running deploy task 'backfill_procedure_expires_when_termine_enabled_without_dossiers'"
|
||||
|
||||
Procedure.where.missing(:dossiers)
|
||||
.where(procedure_expires_when_termine_enabled: false)
|
||||
.update_all(procedure_expires_when_termine_enabled: true)
|
||||
|
||||
AfterParty::TaskRecord
|
||||
.create version: AfterParty::TaskRecorder.new(__FILE__).timestamp
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue