 SELECT * FROM v1_compat.pierre_frapa;
 CREATE TABLE partenaires_naturalistes.stephane_bence AS
 SELECT * FROM v1_compat.stephane_bence;
+
 ALTER TABLE partenaires_naturalistes.bernard_frin ADD CONSTRAINT pk_bernard_frin PRIMARY KEY(gid);
 ALTER TABLE partenaires_naturalistes.christophe_perrier ADD CONSTRAINT pk_christophe_perrier PRIMARY KEY(gid);
 ALTER TABLE partenaires_naturalistes.eric_drouet ADD CONSTRAINT pk_eric_drouet PRIMARY KEY(gid);

SELECT * FROM v1_compat.bib_protocoles;
CREATE TABLE hist_archives.cor_protocoles AS
SELECT * FROM v1_compat.cor_protocoles;
ALTER TABLE hist_archives.bib_critere_arch ADD CONSTRAINT pk_bib_crites_archives PRIMARY KEY(codecritarch);
ALTER TABLE hist_archives.bib_observateurs ADD CONSTRAINT pk_bib_observateurs PRIMARY KEY(codeobs);
ALTER TABLE hist_archives.bib_protocoles ADD CONSTRAINT pk_bib_protocoles PRIMARY KEY(codeprotocole);
ALTER TABLE hist_archives.archives ADD CONSTRAINT pk_archives PRIMARY KEY(num_auto);
ALTER TABLE hist_archives.cor_protocoles ADD CONSTRAINT pk_cor_protocoles PRIMARY KEY(codeprotocole, id_protocole);
ALTER TABLE hist_archives.archives ADD CONSTRAINT fk_archives_bib_critere_arch FOREIGN KEY (codecritarch)
    REFERENCES hist_archives.bib_critere_arch (codecritarch) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION;
ALTER TABLE hist_archives.archives ADD CONSTRAINT fk_archives_bib_lots FOREIGN KEY (id_lot)

    REFERENCES gn_synthese.t_sources (id_source) MATCH SIMPLE ON UPDATE CASCADE ON DELETE NO ACTION;
ALTER TABLE partenaires_experts.experts ADD CONSTRAINT fk_experts_bib_organismes FOREIGN KEY (id_organisme)
    REFERENCES utilisateurs.bib_organismes (id_organisme) MATCH SIMPLE ON UPDATE CASCADE ON DELETE NO ACTION;
ALTER TABLE partenaires_experts.experts ADD CONSTRAINT experts_id_critere_synthese_fkey FOREIGN KEY (id_critere_synthese)
    REFERENCES hist_archives.bib_criteres_synthese_gn1 (id_critere_synthese) MATCH SIMPLE ON UPDATE CASCADE ON DELETE NO ACTION;
ALTER TABLE partenaires_experts.experts ADD CONSTRAINT enforce_dims_the_geom_2154 CHECK (public.st_ndims(the_geom_2154) = 2);
ALTER TABLE partenaires_experts.experts ADD CONSTRAINT enforce_dims_the_geom_3857 CHECK (public.st_ndims(the_geom_3857) = 2);
ALTER TABLE partenaires_experts.experts ADD CONSTRAINT enforce_dims_the_geom_point CHECK (public.st_ndims(the_geom_point) = 2);
