 
 ALTER TABLE t_releves_contact
   ADD CONSTRAINT check_t_releves_contact_hour_max CHECK (hour_min <= hour_max OR date_min < date_max);
+
+ALTER TABLE t_releves_contact
+  ADD CONSTRAINT check_t_releves_contact_regroupement_typ CHECK (ref_nomenclatures.check_nomenclature_type(id_nomenclature_grp_typ,24));
 
 
 ALTER TABLE ONLY t_occurrences_contact

    id_dataset integer NOT NULL,
    id_digitiser integer,
    observers_txt varchar(500),
    date_min timestamp without time zone DEFAULT now() NOT NULL,
    date_max timestamp without time zone DEFAULT now() NOT NULL,
    hour_min time,

    count_max integer,
    meta_create_date timestamp without time zone,
    meta_update_date timestamp without time zone,
    unique_id_sinp_occtax uuid NOT NULL DEFAULT public.uuid_generate_v4()
);
CREATE SEQUENCE cor_counting_contact_id_counting_contact_seq
    START WITH 1
