demarches-normaliennes/db/migrate
Pierre de La Morinerie a4108c7787 db: backport delete_orphans in recent migrations
Recent migrations used ActiveRecord when removing invalid data. This may
break if the ActiveRecord model later changes.

To ensure these migrations will run correctly, even when the code will
have changed, let's use an SQL-based helper instead of ActiveRecord.
2022-03-08 14:48:17 +01:00
..
20190709140415_add_export_queued_to_procedures.rb merge with the work of paul, using 3 links 2019-10-22 09:51:14 +02:00
20190730153555_recreate_structure.rb Replace old migrations with a single “recreate_structure” 2019-09-16 14:44:37 +02:00
20190805140346_gestionnaire_to_instructeur.rb Rename gestionnaires to instructeurs in db 2019-08-12 13:47:01 +02:00
20190808144607_link_user_and_instructeur.rb Link user and instructeur 2019-08-13 15:15:16 +02:00
20190809073736_link_user_and_administrateur.rb Link user and administrateur 2019-08-14 15:06:15 +02:00
20190819134252_create_groupe_instructeurs.rb Create GroupeInstructeur 2019-09-02 11:41:12 +02:00
20190819145355_add_groupe_instructeur_column_to_assign_tos.rb Link AssignTo et GroupeInstructeur 2019-09-02 11:41:12 +02:00
20190822143413_add_groupe_instructeur_id_column_to_dossier.rb Link Dossier and GroupeInstructeur 2019-09-03 06:47:02 +02:00
20190917115911_drop_flipflop_features.rb Remove unused columns and tables 2019-09-17 15:39:15 +02:00
20190917120039_remove_carrierwave_columns.rb Remove unused columns and tables 2019-09-17 15:39:15 +02:00
20190917120047_remove_devise_columns.rb Remove unused columns and tables 2019-09-17 15:39:15 +02:00
20190917120856_remove_unused_columns.rb Remove unused columns and tables 2019-09-17 15:39:15 +02:00
20190917151652_make_path_nonnull.rb Migration: Index and make Procedure.path nonnull 2019-09-17 16:30:48 +02:00
20190920122228_add_indexes_to_dossier.rb Add indexes to Dossier.state, Dossier.archived, Follow.unfollowed_at 2019-09-25 14:10:00 +02:00
20191014160538_add_routing_criteria_name_column_to_procedure.rb Add procedure routing criteria name 2019-10-16 10:30:55 +02:00
20191023183120_add_default_value_to_routing_criteria_name.rb Migration: add defaut value to routing critéria 2019-10-23 21:48:08 +02:00
20191024150452_remove_unique_constraint_on_instructeur_emails.rb instructeurs: create without providing the email 2019-11-04 10:44:24 +01:00
20191113142816_instructeurs_remove_email.rb Drop email on instructeurs 2019-11-13 15:38:44 +01:00
20191114084643_add_closed_at_to_procedures.rb Add closed_at to procedures table 2019-11-28 16:07:14 +01:00
20191127113700_add_unpublished_at_to_procedures.rb Add unpublished_at to procedures 2019-12-04 16:37:37 +01:00
20191128081324_add_near_deletion_notice_send_to_dossier.rb Add brouillon_close_to_expiration_notice_sent_at column to Dossier 2019-12-03 17:18:53 +01:00
20191209141641_remove_administration_id_from_dossier_operation_logs.rb Remove unused column 2019-12-11 17:07:26 +01:00
20191211101608_create_exports.rb Add Export Model 2019-12-18 13:13:15 +01:00
20191211113341_create_export_groupe_instructeur_join_table.rb Add Export Model 2019-12-18 13:13:15 +01:00
20191211153436_add_en_construction_close_to_expiration_to_dossiers.rb Add en_construction_close_to_expiration_notice_sent_at column 2020-03-18 15:25:02 +01:00
20191218103727_add_procedures_path_closed_at_hidden_at_index.rb Cleanup demarche archivee state 2020-01-07 11:13:42 +01:00
20200114113700_add_canonical_procedure_id_to_procedures.rb Add canonical_procedure_id to procedures 2020-01-28 12:49:53 +01:00
20200130165328_remove_unique_constraint_on_administrateur_emails.rb remove unique constraint on admin emails 2020-02-04 16:21:42 +01:00
20200210100938_add_weekly_email_notifications_to_assign_tos.rb Add the possibility to disable weekly email notifications (instructeur) && rename the column email_notifications_enabled to daily_email_notification_enabled 2020-02-12 13:02:31 +00:00
20200211170134_administrateurs_remove_email.rb supprime la colonne email des administrateurs 2020-02-17 15:01:40 +01:00
20200218144724_add_daily_email_notifications_enabled_to_assign_tos.rb Step1 : add new column to Assign_tos and make sure that the data is saved on form submit 2020-02-20 16:14:56 +01:00
20200226174444_add_groupe_instructeur_updated_at_to_dossiers.rb highlight routing criteria label when updated 2020-03-04 14:56:59 +01:00
20200227100001_remove_email_notifications_enabled_from_assign_tos.rb remove email_notifications_enabled column because of the new daily_email_notifications_enabled 2020-02-27 11:09:19 +01:00
20200304155418_add_diffusable_commercialement_to_etablissements.rb récupère les infos d'établissement avec infos non diffusables 2020-03-17 15:57:02 +00:00
20200319101825_add_en_construction_conservation_extension_to_dossiers.rb Do not add default to en_construction_conservation_extension 2020-03-26 11:46:27 +01:00
20200319103836_add_reason_to_deleted_dossiers.rb Add reason to DeletedDossier 2020-03-24 09:30:11 +01:00
20200326120134_add_default_to_en_construction_conservation_extension.rb Add default to en_construction_conservation_extension 2020-03-26 13:03:26 +01:00
20200331164240_add_termine_close_to_expiration_to_dossiers.rb Add termine_close_to_expiration_notice_sent_at to dossiers 2020-04-22 15:39:10 +02:00
20200401161821_add_instant_email_message_notifications_to_assign_tos.rb Envoie une notif aux followers_instructeurs le souhaitant 2020-04-09 14:17:07 +02:00
20200407135256_add_effectifs_mensuels_to_etablissements.rb fetch and show effectif mensuel 2020-04-21 14:22:11 +02:00
20200409075320_add_instant_email_dossier_notifications_to_assign_tos.rb Notifie instructeurs le souhaitant lors depot dossier 2020-04-09 15:02:05 +02:00
20200421174642_rename_effectif_mensuel.rb rename effectif columns 2020-04-21 21:13:07 +02:00
20200422090426_add_effectif_annee_anterieure.rb instructeurs: affiche l'effectif moyen annuel n-1 2020-04-23 09:53:27 +02:00
20200423171759_add_api_entreprise_token_to_procedures.rb store specific api-entreprise token for a procedure 2020-04-28 15:17:11 +02:00
20200429191305_add_bilans_bdf_to_etablissements.rb fetch and store bilans bdf 2020-04-30 16:15:16 +02:00
20200611122406_remove_dossier_procedure_id.rb Remove dossier procedure_id 2020-06-16 11:13:54 +02:00
20200630140356_create_traitements.rb use traitement model 2020-07-08 18:15:15 +02:00
20200707082256_remove_instructeur_id_and_add_instructeur_email_to_traitements.rb store instructeur_email in traitement 2020-07-08 18:15:15 +02:00
20200707082260_create_procedure_revisions.rb Add revisions migrations 2020-07-21 19:35:30 +02:00
20200707082261_create_procedure_revision_types_de_champ.rb Add revisions migrations 2020-07-21 19:35:30 +02:00
20200715143010_add_revoked_at_to_avis.rb revoke expert avis 2020-07-16 21:05:11 +02:00
20200722135121_add_dossiers_latest_updates_to_dossiers.rb add migration 2020-07-30 10:18:44 +02:00
20200819153016_add_enseigne_to_etablissements.rb prend en compte le nom de l'enseigne pour l'établissement 2020-08-20 14:23:02 +02:00
20200902103047_remove_type_de_champ_procedure_id.rb Remove procedure_id from type_de_champ 2020-09-03 15:23:58 +02:00
20200930143755_add_allow_instructor_invite_expert.rb add the possibility for administrator to refuse external review on a specific procedure 2020-10-01 10:55:19 +02:00
20201002124154_create_stats.rb cache landing data 2020-10-06 16:12:01 +02:00
20201103165913_add_devise_two_factor_to_administrations.rb add recoverable and two_factor stragegy for administration 2020-11-05 16:03:55 +01:00
20201104163658_create_archive_for_groupe_instructeur.rb Revert "Revert "Export de tous les dossier d'une démarche"" 2021-04-29 17:29:47 +02:00
20201105131443_rename_administrations_to_super_admins.rb refacto: rename administration to super_admin 2020-11-05 16:03:55 +01:00
20201110155516_add_relations_to_deleted_dossiers.rb add new columns to deleted dossiers 2020-11-12 12:18:59 +01:00
20201117122923_remove_dossier_operation_log_foreign_key.rb Remove foreign key dossier on dossier operations logs 2020-11-17 16:02:53 +01:00
20210107143316_create_experts.rb Ajout du model expert 2021-01-20 18:03:05 +01:00
20210107143938_link_user_and_expert.rb Ajout du model expert 2021-01-20 18:03:05 +01:00
20210112120658_create_experts_procedures.rb Procedure and expert link 2021-01-20 18:03:05 +01:00
20210113084256_add_experts_procedure_to_avis.rb add expert to avis table 2021-01-22 14:31:02 +01:00
20210113150013_add_data_to_champs.rb Add data column to champ 2021-01-14 17:31:37 +01:00
20210114224721_add_external_id_to_champs.rb Add external_id to champs 2021-01-15 11:50:02 +01:00
20210120121240_add_published_at_to_procedure_revisions.rb Add published_at to procedure_revisions 2021-06-03 13:11:16 +02:00
20210121134435_add_unique_index_to_experts_procedures.rb Add unique index to Experts Procedures on expert <> procedure ids 2021-01-22 14:31:02 +01:00
20210204180955_add_job_exception_logs.rb Add job exception logs to dossier and champ 2021-02-04 19:27:27 +01:00
20210307143807_add_claimant_type_to_avis.rb Revert "Revert "Claimant type to avis table"" 2021-03-10 08:48:55 +01:00
20210311141956_add_tmp_expert_migrated_to_avis.rb add tmp_expert_migrated to avis table 2021-03-18 11:38:53 +01:00
20210317094648_add_encrypted_api_particulier_token_to_procedures.rb a procedure has an encrypted api_particulier_token 2021-07-30 11:18:44 +02:00
20210318090000_add_service_name_to_active_storage_blobs.active_storage.rb db: fix ActiveStorage migration to Rails 6.1 2021-03-25 18:08:29 +01:00
20210318090001_create_active_storage_variant_records.active_storage.rb db: migrate ActiveStorage to Rails 6.1 2021-03-25 13:24:53 +01:00
20210330112235_add_not_null_service_name_to_active_storage_blobs.rb db: add last part of ActiveStorage::Blob migration 2021-03-30 12:54:13 +02:00
20210331123709_add_cache_key_to_exports.rb Simplify export unicity check and use create_or_find_by 2021-04-01 21:14:16 +01:00
20210331184808_add_revoked_at_to_experts_procedures.rb add revoked at to experts_procedures 2021-04-06 10:39:22 +02:00
20210402163003_exports_key_not_null.rb Make exports#key not-null 2021-04-02 17:42:24 +01:00
20210407174523_drop_unused_columns.rb Remove unused columns 2021-04-08 12:43:29 +01:00
20210409075105_remove_procedure_id_from_assign_tos.rb remove obsolete procedure_id column in assign_to table 2021-04-09 11:41:13 +02:00
20210409130604_add_bypass_email_login_token_column_to_instructeur.rb add bypass_email_login_token to instructeur 2021-04-13 09:43:38 +02:00
20210412092710_add_data_column_to_france_connect_informations.rb add data column to france_connect_infromations 2021-04-13 09:59:28 +02:00
20210416074049_add_experts_require_administrateur_invitation_to_procedures.rb Add boolean to procedures table 2021-04-19 10:23:45 +02:00
20210416160721_add_index_to_exercice_etablissement_id.rb Add missing etablissement_id index on exercices table (-600ms) 2021-04-22 14:12:50 +02:00
20210419100831_add_deleted_user_email_never_send_to_dossiers.rb Enable user destruction 2021-05-04 12:05:06 +02:00
20210422101149_add_expert_id_to_commentaires.rb Remove the link between commentaire and user 2021-04-22 15:10:47 +01:00
20210427112642_rename_content_type_to_to_time_span_type_for_archives.rb Revert "Revert "Export de tous les dossier d'une démarche"" 2021-04-29 17:29:47 +02:00
20210427120000_add_unique_index_to_invites.rb db: add uniqueness constraints 2021-04-27 15:36:22 +02:00
20210427120001_add_unique_index_to_procedures.rb db: add uniqueness constraints 2021-04-27 15:36:22 +02:00
20210427120002_add_unique_index_to_individuals.rb db: fix migration adding unique index to Individuals 2021-04-27 16:57:46 +02:00
20210427124500_add_key_to_archives.rb Revert "Revert "Export de tous les dossier d'une démarche"" 2021-04-29 17:29:47 +02:00
20210428104228_add_conservation_extension_to_dossiers.rb Rename en_construction_conservation_extension to conservation_extension 2021-05-11 14:08:51 +02:00
20210504115445_add_constraints_to_france_connect_informations.rb [fix #6084] add db constraints to france_connect_informations table 2021-05-05 14:28:20 +02:00
20210506135603_add_default_to_conservation_extension.rb Use conservation_extension instead of en_construction_conservation_extension 2021-05-11 17:33:53 +02:00
20210512175228_add_time_span_type_to_exports.rb Add last_month export 2021-06-23 09:23:10 +02:00
20210604095054_add_declarative_triggered_at_to_dossiers.rb Prevent double processing of declarative dossiers 2021-06-04 17:55:40 +02:00
20210630101808_add_parent_id_to_procedure_revision_type_de_champ.rb feat(procedure_revision_types_de_champ): add parent_id 2021-12-06 21:45:54 +01:00
20210721140812_create_dossier_transfers.rb feat(dossier): add dossier_transfers and dossier_transfer_logs 2021-09-08 14:39:45 +02:00
20210721162213_create_dossier_transfer_logs.rb feat(dossier): add dossier_transfers and dossier_transfer_logs 2021-09-08 14:39:45 +02:00
20210722083911_create_bulk_message_mails.rb create Bulk Message model and migration 2021-07-27 19:38:22 +02:00
20210722133440_add_unique_index_to_champs.rb db: add uniqueness constraints to Champs 2021-07-22 17:56:14 +02:00
20210722133531_add_unique_index_to_deleted_dossiers.rb db: add uniqueness constraints to DeletedDossiers 2021-07-22 17:57:11 +02:00
20210722133553_add_unique_index_to_etablissement.rb db: add uniqueness constraints to Etablissement 2021-07-22 18:00:34 +02:00
20210727172504_add_unique_index_to_bulk_messages_groupe_instructeurs.rb add unique index on bulk messages join table 2021-07-27 20:32:28 +02:00
20210818083349_add_process_expired_to_traitements.rb feat(dossiers): enable dossiers termine expiration behind feature flag 2021-08-18 16:11:35 +01:00
20210826161956_add_locale_to_users.rb feat(i18n): add locale to user 2021-09-07 09:47:01 +02:00
20210908162000_add_api_particulier_scopes_to_procedure.rb add api particulier scopes to procedure 2021-09-16 09:30:11 +02:00
20210908170019_add_api_particulier_sources_to_procedure.rb add api particulier sources to procedure 2021-09-17 13:50:23 +02:00
20210915083823_add_routing_enabled_to_procedures.rb feat(routage): add routing_enabled to procedures 2021-09-18 11:22:35 +02:00
20210923083416_add_instructeurs_self_management_enabled_to_procedures.rb feat(routing): add instructeurs_self_management_enabled to procedures 2021-09-27 15:06:17 +02:00
20211001143403_add_identity_updated_at_to_dossier.rb add identity_updated_at column to dossier 2021-10-05 12:05:43 +02:00
20211005133027_add_value_json_column_to_champ.rb add champ value_json jsonb column 2021-10-12 14:27:20 +02:00
20211006164955_add_manager_to_administrateurs_procedures.rb feat(manager): add become administrateur button in manager (with 24h expiration) 2021-10-07 11:32:12 +02:00
20211011083203_remove_user_id_not_null_constraint_to_france_connect_information.rb allow unattached fci 2021-10-14 14:47:50 +02:00
20211011102957_add_token_columns_to_france_connect_information.rb Add merge token to FCI 2021-10-14 14:47:50 +02:00
20211012100819_add_foreign_key_to_avis_dossier_id.rb fix(avis): add foreign key to avis dossier_id 2021-10-13 09:28:11 +02:00
20211013131241_add_rebased_at_to_champs.rb feat(revisions): add rebased_at to champs 2021-10-20 17:26:09 +02:00
20211020104237_add_champs_etablissement_id_index.rb fix(export): add index on champs.etablissement_id 2021-10-20 16:51:41 +02:00
20211026082232_add_requested_merge_into_column_to_users.rb add requested_merge_into column in user table 2021-11-04 16:10:09 +01:00
20211026131800_create_merge_logs.rb Add merge log 2021-10-28 14:39:13 +02:00
20211104102349_add_lock_version_to_active_storage_blobs.rb add lock version to blobs 2021-11-04 17:42:43 +01:00
20211110095853_add_hide_by_user_at_on_dossiers.rb add hidden by user column on dossiers 2021-11-26 09:45:13 +01:00
20211115112933_add_discarded_at_to_commentaires.rb refactor(Commentarie.soft_delete): use discard 2021-11-16 14:28:38 +01:00
20211119112046_add_agent_connect_sub_column_to_instructeurs_table.rb add agent_connect_id to instructeur 2021-11-23 14:17:59 +01:00
20211124111429_add_depose_at_to_dossiers.rb feat(traitements): add depose_at to dossiers 2021-11-25 12:57:55 +03:00
20211124134220_add_migrated_parent_to_types_de_champ.rb task(type_de_champ): migrate type_de_champ parent_id 2021-12-06 21:45:54 +01:00
20211126080118_add_index_to_deleted_at_to_deleted_dossiers.rb feat(stats#index): update Stat model to also query DossierDeleted in stats computation 2021-11-26 13:29:40 +01:00
20211126150915_dropfeedbackstable.rb Drop unused feedbacks table 2021-11-26 16:20:24 +01:00
20211126152402_move_process_expire_to_procedures.rb refactor(traitement.process_expired): move process expired to procedure 2021-12-03 16:32:36 +01:00
20211127133549_create_zones.rb add db constraints for ministere 2021-12-02 19:24:26 +01:00
20211127143736_add_zone_to_procedures.rb add belongs_to zone for procedure 2021-12-02 19:23:05 +01:00
20211201135804_add_expirants_to_procedure_presentations.rb fix(spec/lint/review): lint and fix spec of previous commits, also fix based on tchak feedback 2021-12-06 07:05:17 +01:00
20211202133139_add_hidden_by_administration_to_dossiers.rb add hidden_by_instructeur_at on dossiers 2021-12-29 17:37:57 +01:00
20211214145059_add_attestation_template_id_to_procedure_revisions.rb Revert "Revert "feat(attestation): revise attestations"" 2022-02-08 16:22:59 +01:00
20220127135056_add_supprimes_recemment_to_procedure_presentations.rb add supprimes_recemment to procedure presentation 2022-01-27 17:00:41 +01:00
20220204093401_add_hidden_by_reason_to_dossiers.rb add hidden by reason to dossiers 2022-02-09 14:43:36 +01:00
20220204130722_create_dossier_submitted_messages.rb fix(relation): avoid double association between procedure/procedure_revision/dossier_submitted_message 2022-02-25 14:01:18 +01:00
20220301160753_add_administrateur_foreign_key_to_administrateurs_procedure.rb db: backport delete_orphans in recent migrations 2022-03-08 14:48:17 +01:00
20220302101337_add_foreign_keys_to_administrateurs_instructeurs.rb db: backport delete_orphans in recent migrations 2022-03-08 14:48:17 +01:00