 ALTER TABLE ONLY synthese
     ADD CONSTRAINT fk_synthese_naturalness FOREIGN KEY (id_nomenclature_naturalness) REFERENCES ref_nomenclatures.t_nomenclatures(id_nomenclature) ON UPDATE CASCADE;
 
+ALTER TABLE ONLY synthese
+    ADD CONSTRAINT fk_synthese_id_validator FOREIGN KEY (id_validator) REFERENCES utilisateurs.t_roles(id_role) ON UPDATE CASCADE;
+
 
 ------------
 --TRIGGERS--


CREATE TABLE synthese (
    id_synthese integer NOT NULL,
    id_module integer,
    entity_module_pk_value integer,
    id_organisme integer,
    id_nomenclature_typ_inf_geo integer DEFAULT 143,
    id_dataset integer,
    id_nomenclature_obs_meth integer DEFAULT 42,
    id_nomenclature_obs_technique integer DEFAULT 343,
    id_nomenclature_bio_status integer DEFAULT 30,

---------
CREATE INDEX fki_synthese_bib_proprietaires ON synthese USING btree (id_organisme);

CREATE INDEX fki_synthese_id_municipality_fkey ON synthese USING btree (id_municipality);

CREATE INDEX fki_synthese_t_modules ON synthese USING btree (id_module);

