diff --git a/lib/tasks/deployment/20190808145006_populate_user_instructeur_ids.rake b/lib/tasks/deployment/20190808145006_populate_user_instructeur_ids.rake new file mode 100644 index 000000000..cf7b473d3 --- /dev/null +++ b/lib/tasks/deployment/20190808145006_populate_user_instructeur_ids.rake @@ -0,0 +1,10 @@ +namespace :after_party do + desc 'Deployment task: populate_user_instructeur_ids' + task populate_user_instructeur_ids: :environment do + Instructeur.find_each do |instructeur| + User.where(email: instructeur.email).update(instructeur_id: instructeur.id) + end + + AfterParty::TaskRecord.create version: '20190808145006' + end +end