diff --git a/lib/tasks/deployment/20190704133852_create_dummy_paths_for_archived_and_hidden_procedures.rake b/lib/tasks/deployment/20190704133852_create_dummy_paths_for_archived_and_hidden_procedures.rake deleted file mode 100644 index ceefc8b86..000000000 --- a/lib/tasks/deployment/20190704133852_create_dummy_paths_for_archived_and_hidden_procedures.rake +++ /dev/null @@ -1,18 +0,0 @@ -namespace :after_party do - desc 'Deployment task: create_dummy_paths_for_archived_and_hidden_procedures' - task create_dummy_paths_for_archived_and_hidden_procedures: :environment do - rake_puts "Running deploy task 'create_dummy_paths_for_archived_procedures'" - - Procedure.with_discarded.archivees.where(path: nil).each do |p| - p.update_column(:path, SecureRandom.uuid) - end - - Procedure.hidden.where(path: nil).each do |p| - p.update_column(:path, SecureRandom.uuid) - end - - # Update task as completed. If you remove the line below, the task will - # run with every deploy (or every time you call after_party:run). - AfterParty::TaskRecord.create version: '20190704133852' - end -end diff --git a/lib/tasks/deployment/20190731152733_migrate_geo_area_data.rake b/lib/tasks/deployment/20190731152733_migrate_geo_area_data.rake deleted file mode 100644 index e5821d722..000000000 --- a/lib/tasks/deployment/20190731152733_migrate_geo_area_data.rake +++ /dev/null @@ -1,28 +0,0 @@ -namespace :after_party do - desc 'Deployment task: migrate_geo_area_data' - task migrate_geo_area_data: :environment do - rake_puts "Running deploy task 'migrate_geo_area_data'" - - progress = ProgressReport.new(Champs::CarteChamp.count) - - Champs::CarteChamp.includes(:geo_areas).find_each do |champ| - geo_area = champ.geo_areas.find(&:selection_utilisateur?) - geo_json = champ.geo_json_from_value - - if geo_area.blank? && geo_json.present? - GeoArea.create( - champ: champ, - geometry: geo_json, - source: GeoArea.sources.fetch(:selection_utilisateur) - ) - progress.inc - end - end - - progress.finish - - # Update task as completed. If you remove the line below, the task will - # run with every deploy (or every time you call after_party:run). - AfterParty::TaskRecord.create version: '20190731152733' - end -end diff --git a/lib/tasks/deployment/20190829065022_migrate_flipflop_to_flipper.rake b/lib/tasks/deployment/20190829065022_migrate_flipflop_to_flipper.rake deleted file mode 100644 index 4892d71de..000000000 --- a/lib/tasks/deployment/20190829065022_migrate_flipflop_to_flipper.rake +++ /dev/null @@ -1,33 +0,0 @@ -namespace :after_party do - desc 'Deployment task: migrate_flipflop_to_flipper' - task migrate_flipflop_to_flipper: :environment do - rake_puts "Running deploy task 'migrate_flipflop_to_flipper'" - - Instructeur.includes(:user).find_each do |instructeur| - if instructeur.features['download_as_zip_enabled'] - pp "enable :instructeur_download_as_zip for #{instructeur.user.email}" - Flipper.enable_actor(:instructeur_download_as_zip, instructeur.user) - end - if instructeur.features['bypass_email_login_token'] - pp "enable :instructeur_bypass_email_login_token for #{instructeur.user.email}" - Flipper.enable_actor(:instructeur_bypass_email_login_token, instructeur.user) - end - end - - Administrateur.includes(:user).find_each do |administrateur| - if administrateur.features['web_hook'] - pp "enable :administrateur_web_hook for #{administrateur.user.email}" - Flipper.enable_actor(:administrateur_web_hook, administrateur.user) - end - - if administrateur.features['champ_integer_number'] - pp "enable :administrateur_champ_integer_number for #{administrateur.user.email}" - Flipper.enable_actor(:administrateur_champ_integer_number, administrateur.user) - end - end - - # Update task as completed. If you remove the line below, the task will - # run with every deploy (or every time you call after_party:run). - AfterParty::TaskRecord.create version: '20190829065022' - end -end diff --git a/lib/tasks/deployment/20200220142710_backfill_daily_email_notification_columns.rake b/lib/tasks/deployment/20200220142710_backfill_daily_email_notification_columns.rake deleted file mode 100644 index 919441434..000000000 --- a/lib/tasks/deployment/20200220142710_backfill_daily_email_notification_columns.rake +++ /dev/null @@ -1,16 +0,0 @@ -namespace :after_party do - desc 'Deployment task: backfill_daily_email_notification_columns' - task backfill_daily_email_notification_columns: :environment do - puts "Running deploy task 'backfill_daily_email_notification_columns'" - AssignTo.find_each do |assign_to| - columns_to_update = {} - if assign_to.email_notifications_enabled != assign_to.daily_email_notifications_enabled - columns_to_update[:daily_email_notifications_enabled] = assign_to.email_notifications_enabled - end - assign_to.update_columns(columns_to_update) unless columns_to_update.empty? - end - # Update task as completed. If you remove the line below, the task will - # run with every deploy (or every time you call after_party:run). - AfterParty::TaskRecord.create version: '20200220142710' - end # task :backfill_daily_email_notification_columns -end # namespace :after_party