-- MàJ de la version en BDD
UPDATE om_version SET om_version = '6.8.0' WHERE exists(SELECT 1 FROM om_version) = true;
INSERT INTO om_version
SELECT ('6.8.0') WHERE exists(SELECT 1 FROM om_version) = false;

--
-- BEGIN / [#10473] Optimisation de la requête de génération des champs de fusion des instructions
--

CREATE INDEX IF NOT EXISTS idx_affectation_automatique_arrondissement ON openads.affectation_automatique (arrondissement);
CREATE INDEX IF NOT EXISTS idx_affectation_automatique_dossier_autorisation_type_detaille ON openads.affectation_automatique (dossier_autorisation_type_detaille);
CREATE INDEX IF NOT EXISTS idx_affectation_automatique_dossier_instruction_type ON openads.affectation_automatique (dossier_instruction_type);
CREATE INDEX IF NOT EXISTS idx_affectation_automatique_instructeur_2 ON openads.affectation_automatique (instructeur_2);
CREATE INDEX IF NOT EXISTS idx_affectation_automatique_instructeur ON openads.affectation_automatique (instructeur);
CREATE INDEX IF NOT EXISTS idx_affectation_automatique_quartier ON openads.affectation_automatique (quartier);
CREATE INDEX IF NOT EXISTS idx_avis_decision_avis_decision_nature ON openads.avis_decision (avis_decision_nature);
CREATE INDEX IF NOT EXISTS idx_avis_decision_avis_decision_type ON openads.avis_decision (avis_decision_type);
CREATE INDEX IF NOT EXISTS idx_bible_dossier_autorisation_type ON openads.bible (dossier_autorisation_type);
CREATE INDEX IF NOT EXISTS idx_bible_evenement ON openads.bible (evenement);
CREATE INDEX IF NOT EXISTS idx_bible_om_collectivite ON openads.bible (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_commission_commission_type ON openads.commission (commission_type);
CREATE INDEX IF NOT EXISTS idx_commission_om_collectivite ON openads.commission (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_commission_type_om_collectivite ON openads.commission_type (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_consultation_avis_consultation ON openads.consultation (avis_consultation);
CREATE INDEX IF NOT EXISTS idx_consultation_categorie_tiers_consulte ON openads.consultation (categorie_tiers_consulte);
CREATE INDEX IF NOT EXISTS idx_consultation_motif_consultation ON openads.consultation (motif_consultation);
CREATE INDEX IF NOT EXISTS idx_consultation_service ON openads.consultation (service);
CREATE INDEX IF NOT EXISTS idx_consultation_tiers_consulte ON openads.consultation (tiers_consulte);
CREATE INDEX IF NOT EXISTS idx_contrainte_om_collectivite ON openads.contrainte (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_demande_arrondissement ON openads.demande (arrondissement);
CREATE INDEX IF NOT EXISTS idx_demande_autorisation_contestee ON openads.demande (autorisation_contestee);
CREATE INDEX IF NOT EXISTS idx_demande_commune ON openads.demande (commune);
CREATE INDEX IF NOT EXISTS idx_demande_demande_type ON openads.demande (demande_type);
CREATE INDEX IF NOT EXISTS idx_demande_dossier_autorisation_type_detaille ON openads.demande (dossier_autorisation_type_detaille);
CREATE INDEX IF NOT EXISTS idx_demande_instruction_recepisse ON openads.demande (instruction_recepisse);
CREATE INDEX IF NOT EXISTS idx_demande_om_collectivite ON openads.demande (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_demande_type_demande_nature ON openads.demande_type (demande_nature);
CREATE INDEX IF NOT EXISTS idx_demande_type_dossier_autorisation_type_detaille ON openads.demande_type (dossier_autorisation_type_detaille);
CREATE INDEX IF NOT EXISTS idx_demande_type_dossier_instruction_type ON openads.demande_type (dossier_instruction_type);
CREATE INDEX IF NOT EXISTS idx_demande_type_evenement ON openads.demande_type (evenement);
CREATE INDEX IF NOT EXISTS idx_demande_type_groupe ON openads.demande_type (groupe);
CREATE INDEX IF NOT EXISTS idx_demandeur_om_collectivite ON openads.demandeur (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_demandeur_particulier_civilite ON openads.demandeur (particulier_civilite);
CREATE INDEX IF NOT EXISTS idx_demandeur_personne_morale_civilite ON openads.demandeur (personne_morale_civilite);
CREATE INDEX IF NOT EXISTS idx_direction_om_collectivite ON openads.direction (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_division_direction ON openads.division (direction);
CREATE INDEX IF NOT EXISTS idx_document_numerise_document_numerise_nature ON openads.document_numerise (document_numerise_nature);
CREATE INDEX IF NOT EXISTS idx_document_numerise_document_numerise_type ON openads.document_numerise (document_numerise_type);
CREATE INDEX IF NOT EXISTS idx_document_numerise_type_document_numerise_type_categorie ON openads.document_numerise_type (document_numerise_type_categorie);
CREATE INDEX IF NOT EXISTS idx_document_type_document_type_categorie ON openads.document_type (document_type_categorie);
CREATE INDEX IF NOT EXISTS idx_donnees_techniques_architecte ON openads.donnees_techniques (architecte);
CREATE INDEX IF NOT EXISTS idx_donnees_techniques_ctx_objet_recours ON openads.donnees_techniques (ctx_objet_recours);
CREATE INDEX IF NOT EXISTS idx_dossier_autorisation_arrondissement ON openads.dossier_autorisation (arrondissement);
CREATE INDEX IF NOT EXISTS idx_dossier_autorisation_avis_decision ON openads.dossier_autorisation (avis_decision);
CREATE INDEX IF NOT EXISTS idx_dossier_autorisation_commune ON openads.dossier_autorisation (commune);
CREATE INDEX IF NOT EXISTS idx_dossier_autorisation_contestee ON openads.dossier (autorisation_contestee);
CREATE INDEX IF NOT EXISTS idx_dossier_autorisation_dossier_autorisation_type_detaille ON openads.dossier_autorisation (dossier_autorisation_type_detaille) /* maybe redundant with: openads.dossier_autorisation_dad_etat_idx */;
CREATE INDEX IF NOT EXISTS idx_dossier_autorisation_etat_dernier_dossier_instruction_accepte ON openads.dossier_autorisation (etat_dernier_dossier_instruction_accepte);
CREATE INDEX IF NOT EXISTS idx_dossier_autorisation_om_collectivite ON openads.dossier_autorisation (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_dossier_autorisation_type_detaille_cerfa_lot ON openads.dossier_autorisation_type_detaille (cerfa_lot);
CREATE INDEX IF NOT EXISTS idx_dossier_autorisation_type_detaille_cerfa ON openads.dossier_autorisation_type_detaille (cerfa);
CREATE INDEX IF NOT EXISTS idx_dossier_autorisation_type_groupe ON openads.dossier_autorisation_type (groupe);
CREATE INDEX IF NOT EXISTS idx_dossier_autorite_competente ON openads.dossier (autorite_competente);
CREATE INDEX IF NOT EXISTS idx_dossier_avis_decision ON openads.dossier (avis_decision);
CREATE INDEX IF NOT EXISTS idx_dossier_commission_commission ON openads.dossier_commission (commission);
CREATE INDEX IF NOT EXISTS idx_dossier_commission_commission_type ON openads.dossier_commission (commission_type);
CREATE INDEX IF NOT EXISTS idx_dossier_contrainte_contrainte ON openads.dossier_contrainte (contrainte);
CREATE INDEX IF NOT EXISTS idx_dossier_division ON openads.dossier (division);
CREATE INDEX IF NOT EXISTS idx_dossier_etat_pendant_incompletude ON openads.dossier (etat_pendant_incompletude);
CREATE INDEX IF NOT EXISTS idx_dossier_evenement_suivant_tacite_incompletude ON openads.dossier (evenement_suivant_tacite_incompletude);
CREATE INDEX IF NOT EXISTS idx_dossier_evenement_suivant_tacite ON openads.dossier (evenement_suivant_tacite);
CREATE INDEX IF NOT EXISTS idx_dossier_instructeur_2 ON openads.dossier (instructeur_2);
CREATE INDEX IF NOT EXISTS idx_dossier_instructeur ON openads.dossier (instructeur);
CREATE INDEX IF NOT EXISTS idx_dossier_operateur_operateur_designe ON openads.dossier_operateur (operateur_designe);
CREATE INDEX IF NOT EXISTS idx_dossier_operateur_operateur_detecte_inrap ON openads.dossier_operateur (operateur_detecte_inrap);
CREATE INDEX IF NOT EXISTS idx_dossier_operateur_operateur_personne_publique ON openads.dossier_operateur (operateur_personne_publique);
CREATE INDEX IF NOT EXISTS idx_dossier_operateur_operateur_selectionne ON openads.dossier_operateur (operateur_selectionne);
CREATE INDEX IF NOT EXISTS idx_dossier_pec_metier ON openads.dossier (pec_metier);
CREATE INDEX IF NOT EXISTS idx_dossier_quartier ON openads.dossier (quartier);
CREATE INDEX IF NOT EXISTS idx_evenement_action ON openads.evenement (action);
CREATE INDEX IF NOT EXISTS idx_evenement_autorite_competente ON openads.evenement (autorite_competente);
CREATE INDEX IF NOT EXISTS idx_evenement_avis_decision ON openads.evenement (avis_decision);
CREATE INDEX IF NOT EXISTS idx_evenement_document_type ON openads.evenement (document_type);
CREATE INDEX IF NOT EXISTS idx_evenement_etat ON openads.evenement (etat);
CREATE INDEX IF NOT EXISTS idx_evenement_evenement_retour_ar ON openads.evenement (evenement_retour_ar);
CREATE INDEX IF NOT EXISTS idx_evenement_evenement_retour_signature ON openads.evenement (evenement_retour_signature);
CREATE INDEX IF NOT EXISTS idx_evenement_evenement_suivant_tacite ON openads.evenement (evenement_suivant_tacite);
CREATE INDEX IF NOT EXISTS idx_evenement_pec_metier ON openads.evenement (pec_metier);
CREATE INDEX IF NOT EXISTS idx_evenement_phase ON openads.evenement (phase);
CREATE INDEX IF NOT EXISTS idx_evenement_type_habilitation_tiers_consulte_evenement ON openads.evenement_type_habilitation_tiers_consulte (evenement);
CREATE INDEX IF NOT EXISTS idx_evenement_type_habilitation_tiers_consulte_type_habilitation_tiers_consulte ON openads.evenement_type_habilitation_tiers_consulte (type_habilitation_tiers_consulte);
CREATE INDEX IF NOT EXISTS idx_extra_data_register_values_definition_ref ON openads.extra_data_register_values (definition_ref) /* maybe redundant with: openads.extra_data_register_values_definition_ref_object_id_index, openads.extra_data_register_values_definition_ref_object_id_uniq */;
CREATE INDEX IF NOT EXISTS idx_groupe_genre ON openads.groupe (genre);
CREATE INDEX IF NOT EXISTS idx_instructeur_division ON openads.instructeur (division);
CREATE INDEX IF NOT EXISTS idx_instructeur_instructeur_qualite ON openads.instructeur (instructeur_qualite);
CREATE INDEX IF NOT EXISTS idx_instruction_action ON openads.instruction (action);
CREATE INDEX IF NOT EXISTS idx_instruction_archive_etat_pendant_incompletude ON openads.instruction (archive_etat_pendant_incompletude);
CREATE INDEX IF NOT EXISTS idx_instruction_archive_evenement_suivant_tacite_incompletude ON openads.instruction (archive_evenement_suivant_tacite_incompletude);
CREATE INDEX IF NOT EXISTS idx_instruction_archive_evenement_suivant_tacite ON openads.instruction (archive_evenement_suivant_tacite);
CREATE INDEX IF NOT EXISTS idx_instruction_autorite_competente ON openads.instruction (autorite_competente);
CREATE INDEX IF NOT EXISTS idx_instruction_avis_decision ON openads.instruction (avis_decision);
CREATE INDEX IF NOT EXISTS idx_instruction_document_numerise ON openads.instruction (document_numerise);
CREATE INDEX IF NOT EXISTS idx_instruction_document_type_instruction ON openads.instruction (document_type_instruction);
CREATE INDEX IF NOT EXISTS idx_instruction_etat ON openads.instruction (etat);
CREATE INDEX IF NOT EXISTS idx_instruction_evenement ON openads.instruction (evenement) /* maybe redundant with: openads.instruction_date_retour_rar_evenement_idx */;
CREATE INDEX IF NOT EXISTS idx_instruction_notification_document_instruction_notification ON openads.instruction_notification_document (instruction_notification);
CREATE INDEX IF NOT EXISTS idx_instruction_notification_instruction ON openads.instruction_notification (instruction);
CREATE INDEX IF NOT EXISTS idx_instruction_pec_metier ON openads.instruction (pec_metier);
CREATE INDEX IF NOT EXISTS idx_instruction_signataire_arrete ON openads.instruction (signataire_arrete);
CREATE INDEX IF NOT EXISTS idx_lien_demande_demandeur_demande ON openads.lien_demande_demandeur (demande);
CREATE INDEX IF NOT EXISTS idx_lien_demande_demandeur_demandeur ON openads.lien_demande_demandeur (demandeur);
CREATE INDEX IF NOT EXISTS idx_lien_demande_type_dossier_instruction_type_demande_type ON openads.lien_demande_type_dossier_instruction_type (demande_type);
CREATE INDEX IF NOT EXISTS idx_lien_demande_type_dossier_instruction_type_dossier_instruction_type ON openads.lien_demande_type_dossier_instruction_type (dossier_instruction_type);
CREATE INDEX IF NOT EXISTS idx_lien_demande_type_etat_demande_type ON openads.lien_demande_type_etat (demande_type);
CREATE INDEX IF NOT EXISTS idx_lien_demande_type_etat_etat ON openads.lien_demande_type_etat (etat);
CREATE INDEX IF NOT EXISTS idx_lien_document_n_type_d_i_t_document_numerise_type ON openads.lien_document_n_type_d_i_t (document_numerise_type);
CREATE INDEX IF NOT EXISTS idx_lien_document_n_type_d_i_t_dossier_instruction_type ON openads.lien_document_n_type_d_i_t (dossier_instruction_type);
CREATE INDEX IF NOT EXISTS idx_lien_document_numerise_type_instructeur_qualite_document_numerise_type ON openads.lien_document_numerise_type_instructeur_qualite (document_numerise_type);
CREATE INDEX IF NOT EXISTS idx_lien_document_numerise_type_instructeur_qualite_instructeur_qualite ON openads.lien_document_numerise_type_instructeur_qualite (instructeur_qualite);
CREATE INDEX IF NOT EXISTS idx_lien_donnees_techniques_moyen_retenu_juge_donnees_techniques ON openads.lien_donnees_techniques_moyen_retenu_juge (donnees_techniques);
CREATE INDEX IF NOT EXISTS idx_lien_donnees_techniques_moyen_retenu_juge_moyen_retenu_juge ON openads.lien_donnees_techniques_moyen_retenu_juge (moyen_retenu_juge);
CREATE INDEX IF NOT EXISTS idx_lien_donnees_techniques_moyen_souleve_donnees_techniques ON openads.lien_donnees_techniques_moyen_souleve (donnees_techniques);
CREATE INDEX IF NOT EXISTS idx_lien_donnees_techniques_moyen_souleve_moyen_souleve ON openads.lien_donnees_techniques_moyen_souleve (moyen_souleve);
CREATE INDEX IF NOT EXISTS idx_lien_dossier_dossier_dossier_cible ON openads.lien_dossier_dossier (dossier_cible) /* maybe redundant with: openads.lien_dossier_dossier_dossier_src_dossier_cible_key */;
CREATE INDEX IF NOT EXISTS idx_lien_dossier_instruction_type_evenement_dossier_instruction_type ON openads.lien_dossier_instruction_type_evenement (dossier_instruction_type);
CREATE INDEX IF NOT EXISTS idx_lien_dossier_instruction_type_evenement_evenement ON openads.lien_dossier_instruction_type_evenement (evenement);
CREATE INDEX IF NOT EXISTS idx_lien_lot_demandeur_demandeur ON openads.lien_lot_demandeur (demandeur);
CREATE INDEX IF NOT EXISTS idx_lien_lot_demandeur_lot ON openads.lien_lot_demandeur (lot);
CREATE INDEX IF NOT EXISTS idx_lien_om_profil_groupe_groupe ON openads.lien_om_profil_groupe (groupe) /* maybe redundant with: openads.om_profil_groupe_key */;
CREATE INDEX IF NOT EXISTS idx_lien_om_profil_groupe_om_profil ON openads.lien_om_profil_groupe (om_profil) /* maybe redundant with: openads.om_profil_groupe_key */;
CREATE INDEX IF NOT EXISTS idx_lien_om_utilisateur_groupe_groupe ON openads.lien_om_utilisateur_groupe (groupe);
CREATE INDEX IF NOT EXISTS idx_lien_service_om_utilisateur_om_utilisateur ON openads.lien_service_om_utilisateur (om_utilisateur) /* maybe redundant with: openads.service_om_utilisateur_unique */;
CREATE INDEX IF NOT EXISTS idx_lien_service_om_utilisateur_service ON openads.lien_service_om_utilisateur (service) /* maybe redundant with: openads.service_om_utilisateur_unique */;
CREATE INDEX IF NOT EXISTS idx_lien_service_service_categorie_service_categorie ON openads.lien_service_service_categorie (service_categorie);
CREATE INDEX IF NOT EXISTS idx_lien_service_service_categorie_service ON openads.lien_service_service_categorie (service);
CREATE INDEX IF NOT EXISTS idx_lien_sig_contrainte_dossier_instruction_type_dossier_instruction_type ON openads.lien_sig_contrainte_dossier_instruction_type (dossier_instruction_type);
CREATE INDEX IF NOT EXISTS idx_lien_sig_contrainte_dossier_instruction_type_sig_contrainte ON openads.lien_sig_contrainte_dossier_instruction_type (sig_contrainte);
CREATE INDEX IF NOT EXISTS idx_lien_sig_contrainte_evenement_evenement ON openads.lien_sig_contrainte_evenement (evenement) /* maybe redundant with: openads.lien_sig_contrainte_evenement_unique */;
CREATE INDEX IF NOT EXISTS idx_lien_sig_contrainte_evenement_sig_contrainte ON openads.lien_sig_contrainte_evenement (sig_contrainte) /* maybe redundant with: openads.lien_sig_contrainte_evenement_unique */;
CREATE INDEX IF NOT EXISTS idx_lien_sig_contrainte_om_collectivite_om_collectivite ON openads.lien_sig_contrainte_om_collectivite (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_lien_sig_contrainte_om_collectivite_sig_contrainte ON openads.lien_sig_contrainte_om_collectivite (sig_contrainte);
CREATE INDEX IF NOT EXISTS idx_lien_sig_contrainte_sig_attribut_sig_attribut ON openads.lien_sig_contrainte_sig_attribut (sig_attribut);
CREATE INDEX IF NOT EXISTS idx_lien_sig_contrainte_sig_attribut_sig_contrainte ON openads.lien_sig_contrainte_sig_attribut (sig_contrainte);
CREATE INDEX IF NOT EXISTS idx_lien_type_di_type_di_dossier_instruction_type ON openads.lien_type_di_type_di (dossier_instruction_type);
CREATE INDEX IF NOT EXISTS idx_lien_type_di_type_di_type_di_parent ON openads.lien_type_di_type_di (type_di_parent);
CREATE INDEX IF NOT EXISTS idx_nature_travaux_famille_travaux ON openads.nature_travaux (famille_travaux);
CREATE INDEX IF NOT EXISTS idx_num_bordereau_om_collectivite ON openads.num_bordereau (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_num_dossier_num_bordereau ON openads.num_dossier (num_bordereau);
CREATE INDEX IF NOT EXISTS idx_num_dossier_om_collectivite ON openads.num_dossier (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_om_dashboard_om_profil ON openads.om_dashboard (om_profil);
CREATE INDEX IF NOT EXISTS idx_om_dashboard_om_widget ON openads.om_dashboard (om_widget);
CREATE INDEX IF NOT EXISTS idx_om_droit_om_profil ON openads.om_droit (om_profil) /* maybe redundant with: openads.om_droit_libelle_om_profil_key */;
CREATE INDEX IF NOT EXISTS idx_om_etat_om_collectivite ON openads.om_etat (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_om_etat_om_sql ON openads.om_etat (om_sql);
CREATE INDEX IF NOT EXISTS idx_om_lettretype_om_collectivite ON openads.om_lettretype (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_om_lettretype_om_sql ON openads.om_lettretype (om_sql);
CREATE INDEX IF NOT EXISTS idx_om_logo_om_collectivite ON openads.om_logo (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_om_parametre_om_collectivite ON openads.om_parametre (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_om_sig_flux_om_collectivite ON openads.om_sig_flux (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_om_sig_map_comp_om_sig_map ON openads.om_sig_map_comp (om_sig_map);
CREATE INDEX IF NOT EXISTS idx_om_sig_map_flux_om_sig_flux ON openads.om_sig_map_flux (om_sig_flux);
CREATE INDEX IF NOT EXISTS idx_om_sig_map_flux_om_sig_map ON openads.om_sig_map_flux (om_sig_map);
CREATE INDEX IF NOT EXISTS idx_om_sig_map_om_collectivite ON openads.om_sig_map (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_om_sig_map_om_sig_extent ON openads.om_sig_map (om_sig_extent);
CREATE INDEX IF NOT EXISTS idx_om_sig_map_source_flux ON openads.om_sig_map (source_flux);
CREATE INDEX IF NOT EXISTS idx_om_sousetat_om_collectivite ON openads.om_sousetat (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_om_utilisateur_om_collectivite ON openads.om_utilisateur (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_om_utilisateur_om_profil ON openads.om_utilisateur (om_profil);
CREATE INDEX IF NOT EXISTS idx_parametrage_annexe_instruction ON openads.parametrage_annexe (instruction);
CREATE INDEX IF NOT EXISTS idx_quartier_arrondissement ON openads.quartier (arrondissement);
CREATE INDEX IF NOT EXISTS idx_rapport_instruction_modele ON openads.rapport_instruction (modele);
CREATE INDEX IF NOT EXISTS idx_service_edition ON openads.service (edition);
CREATE INDEX IF NOT EXISTS idx_service_om_collectivite ON openads.service (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_sig_attribut_sig_couche ON openads.sig_attribut (sig_couche);
CREATE INDEX IF NOT EXISTS idx_sig_contrainte_groupe ON openads.sig_contrainte (groupe);
CREATE INDEX IF NOT EXISTS idx_sig_contrainte_sig_couche ON openads.sig_contrainte (sig_couche);
CREATE INDEX IF NOT EXISTS idx_sig_contrainte_sousgroupe ON openads.sig_contrainte (sousgroupe);
CREATE INDEX IF NOT EXISTS idx_signataire_arrete_civilite ON openads.signataire_arrete (civilite);
CREATE INDEX IF NOT EXISTS idx_signataire_arrete_om_collectivite ON openads.signataire_arrete (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_signataire_arrete_signataire_habilitation ON openads.signataire_arrete (signataire_habilitation);
CREATE INDEX IF NOT EXISTS idx_storage_om_collectivite ON openads.storage (om_collectivite);
CREATE INDEX IF NOT EXISTS idx_transition_etat ON openads.transition (etat);
CREATE INDEX IF NOT EXISTS idx_transition_evenement ON openads.transition (evenement);

ALTER TABLE openads.demande ALTER COLUMN autorisation_contestee type character varying(255);
ALTER TABLE openads.lien_service_om_utilisateur ALTER COLUMN om_utilisateur type integer;
ALTER TABLE openads.blocnote ALTER COLUMN dossier type character varying(255);

--
-- END / [#10473] Optimisation de la requête de génération des champs de fusion des instructions
--