diff --git a/lib/tasks/2019_03_13_migrate_pjs_to_champs.rake b/lib/tasks/2019_03_13_migrate_pjs_to_champs.rake new file mode 100644 index 000000000..ad8194116 --- /dev/null +++ b/lib/tasks/2019_03_13_migrate_pjs_to_champs.rake @@ -0,0 +1,8 @@ +namespace :'2019_03_13_migrate_pjs_to_champs' do + task run: :environment do + procedure_id = ENV['PROCEDURE_ID'] + service = PieceJustificativeToChampPieceJointeMigrationService.new + service.ensure_correct_storage_configuration! + service.convert_procedure_pjs_to_champ_pjs(Procedure.find(procedure_id)) + end +end