Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
-- Nettoyage base eFlore pour Gentiana. Seules les données de la BDNFF et des projets liés sont gardées.
DELETE FROM `eflore_chorologie_donnee` WHERE `ecd_id_version_projet_donnee_choro` != 12;
DELETE FROM `eflore_chorologie_information` WHERE `eci_id_version_projet_info_choro` != 12;
DELETE FROM `eflore_info_txt` WHERE `eit_id_version_projet_txt` != 25;
DELETE FROM `eflore_nom` WHERE `en_id_version_projet_nom` != 25;
DELETE FROM `eflore_naturaliste_intitule_abreviation` WHERE enaia_id_intitule_naturaliste_abrege NOT IN (SELECT `en_ce_auteur_basio_ex`FROM eflore_nom WHERE `en_id_version_projet_nom` = 25)
AND enaia_id_intitule_naturaliste_abrege NOT IN (SELECT `en_ce_auteur_basio`FROM eflore_nom WHERE `en_id_version_projet_nom` = 25)
AND enaia_id_intitule_naturaliste_abrege NOT IN (SELECT `en_ce_auteur_modif_ex`FROM eflore_nom WHERE `en_id_version_projet_nom` = 25)
AND enaia_id_intitule_naturaliste_abrege NOT IN (SELECT `en_ce_auteur_modif`FROM eflore_nom WHERE `en_id_version_projet_nom` = 25);
DELETE FROM `eflore_nom_a_txt` WHERE `enat_id_version_projet_nom` != 25;
DELETE FROM eflore_nom_citation WHERE enci_id_citation NOT IN (SELECT en_ce_citation_initiale FROM eflore_nom);
DELETE FROM `eflore_nom_intitule` WHERE `eni_id_version_projet_nom` != 25;
DELETE FROM eflore_nom_intitule_commentaire WHERE enic_id_intitule_cn NOT IN (SELECT en_ce_citation_initiale FROM eflore_nom);
DELETE FROM `eflore_nom_relation` WHERE `enr_id_version_projet_nom_1` != 25 AND `enr_id_version_projet_nom_2` != 25;
DELETE FROM `eflore_protection` WHERE `ept_id_version_projet_protection` != 36;
DELETE FROM `eflore_selection_nom` WHERE `esn_id_version_projet_nom` != 25;
DELETE FROM `eflore_taxon` WHERE `et_id_version_projet_taxon` != 25;
DELETE FROM `eflore_taxon_a_protection` WHERE `etap_id_version_projet_taxon` != 25;
DELETE FROM `eflore_taxon_a_txt` WHERE `etat_id_version_projet_taxon` != 25;
DELETE FROM `eflore_taxon_relation` WHERE `etr_id_version_projet_taxon_1` != 25;
DELETE FROM `eflore_vernaculaire` WHERE `ev_id_version_projet_nom_verna` != 24;
DELETE FROM `eflore_vernaculaire_attribution` WHERE `eva_id_version_projet_nom_verna` != 24;