 --
 
 ALTER TABLE ONLY public.dataset
-    ADD CONSTRAINT dataset_survey_id_fkey FOREIGN KEY (survey_id) REFERENCES public.survey(survey_id);
+    ADD CONSTRAINT dataset_survey_id_fkey FOREIGN KEY (survey_id) REFERENCES public.survey(survey_id) ON UPDATE CASCADE ON DELETE NO ACTION;
 
 
 --

--

ALTER TABLE ONLY public.distribution
    ADD CONSTRAINT distribution_protocol_id_fkey FOREIGN KEY (protocol_id) REFERENCES public.protocol(protocol_id) ON UPDATE CASCADE;


-- Completed on 2018-07-20 08:55:41

--

ALTER TABLE ONLY public.dataset_keyword
    ADD CONSTRAINT dataset_keyword_dataset_id_fkey FOREIGN KEY (dataset_id) REFERENCES public.dataset(dataset_id) ON UPDATE CASCADE ON DELETE NO ACTION;


--
