demarches-normaliennes/lib/tasks/deployment/20190809074534_populate_user_administrateur_ids.rake

11 lines
361 B
Ruby
Raw Normal View History

2019-08-09 09:50:55 +02:00
namespace :after_party do
desc 'Deployment task: populate_user_administrateur_ids'
task populate_user_administrateur_ids: :environment do
Administrateur.find_each do |administrateur|
User.where(email: administrateur.email).update(administrateur_id: administrateur.id)
end
AfterParty::TaskRecord.create version: '20190809074534'
end
end