5609 |
5609 |
-- Name: classcontributor_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5610 |
5610 |
--
|
5611 |
5611 |
|
5612 |
|
ALTER TABLE classcontributor
|
5613 |
|
ADD CONSTRAINT classcontributor_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5614 |
5612 |
|
5615 |
5613 |
|
|
5614 |
|
5616 |
5615 |
--
|
5617 |
5616 |
-- Name: classcontributor_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5618 |
5617 |
--
|
... | ... | |
5625 |
5624 |
-- Name: commclass_classpublication_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5626 |
5625 |
--
|
5627 |
5626 |
|
5628 |
|
ALTER TABLE commclass
|
5629 |
|
ADD CONSTRAINT commclass_classpublication_id FOREIGN KEY (classpublication_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5630 |
5627 |
|
5631 |
5628 |
|
|
5629 |
|
5632 |
5630 |
--
|
5633 |
5631 |
-- Name: commclass_locationevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5634 |
5632 |
--
|
... | ... | |
5649 |
5647 |
-- Name: commconcept_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5650 |
5648 |
--
|
5651 |
5649 |
|
5652 |
|
ALTER TABLE commconcept
|
5653 |
|
ADD CONSTRAINT commconcept_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5654 |
5650 |
|
5655 |
5651 |
|
|
5652 |
|
5656 |
5653 |
--
|
5657 |
5654 |
-- Name: commcorrelation_commconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5658 |
5655 |
--
|
... | ... | |
5673 |
5670 |
-- Name: commdetermination_commauthority_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5674 |
5671 |
--
|
5675 |
5672 |
|
5676 |
|
ALTER TABLE commdetermination
|
5677 |
|
ADD CONSTRAINT commdetermination_commauthority_id FOREIGN KEY (commauthority_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5678 |
5673 |
|
5679 |
5674 |
|
|
5675 |
|
5680 |
5676 |
--
|
5681 |
5677 |
-- Name: commdetermination_commclass_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5682 |
5678 |
--
|
... | ... | |
5713 |
5709 |
-- Name: commname_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5714 |
5710 |
--
|
5715 |
5711 |
|
5716 |
|
ALTER TABLE commname
|
5717 |
|
ADD CONSTRAINT commname_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5718 |
5712 |
|
5719 |
5713 |
|
|
5714 |
|
5720 |
5715 |
--
|
5721 |
5716 |
-- Name: commstatus_commconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5722 |
5717 |
--
|
... | ... | |
5737 |
5732 |
-- Name: commstatus_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5738 |
5733 |
--
|
5739 |
5734 |
|
5740 |
|
ALTER TABLE commstatus
|
5741 |
|
ADD CONSTRAINT commstatus_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5742 |
5735 |
|
5743 |
5736 |
|
|
5737 |
|
5744 |
5738 |
--
|
5745 |
5739 |
-- Name: commstatus_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5746 |
5740 |
--
|
5747 |
5741 |
|
5748 |
|
ALTER TABLE commstatus
|
5749 |
|
ADD CONSTRAINT commstatus_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5750 |
5742 |
|
5751 |
5743 |
|
|
5744 |
|
5752 |
5745 |
--
|
5753 |
5746 |
-- Name: commusage_commconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5754 |
5747 |
--
|
... | ... | |
5777 |
5770 |
-- Name: commusage_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5778 |
5771 |
--
|
5779 |
5772 |
|
5780 |
|
ALTER TABLE commusage
|
5781 |
|
ADD CONSTRAINT commusage_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5782 |
5773 |
|
5783 |
5774 |
|
|
5775 |
|
5784 |
5776 |
--
|
5785 |
5777 |
-- Name: coverindex_covermethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5786 |
5778 |
--
|
... | ... | |
5793 |
5785 |
-- Name: covermethod_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5794 |
5786 |
--
|
5795 |
5787 |
|
5796 |
|
ALTER TABLE covermethod
|
5797 |
|
ADD CONSTRAINT covermethod_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5798 |
5788 |
|
5799 |
5789 |
|
|
5790 |
|
5800 |
5791 |
--
|
5801 |
5792 |
-- Name: definedvalue_userdefined_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5802 |
5793 |
--
|
... | ... | |
5841 |
5832 |
-- Name: location_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5842 |
5833 |
--
|
5843 |
5834 |
|
5844 |
|
ALTER TABLE location
|
5845 |
|
ADD CONSTRAINT location_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5846 |
5835 |
|
5847 |
5836 |
|
|
5837 |
|
5848 |
5838 |
--
|
5849 |
5839 |
-- Name: locationevent_covermethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5850 |
5840 |
--
|
... | ... | |
5897 |
5887 |
-- Name: locationeventcontributor_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5898 |
5888 |
--
|
5899 |
5889 |
|
5900 |
|
ALTER TABLE locationeventcontributor
|
5901 |
|
ADD CONSTRAINT locationeventcontributor_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5902 |
5890 |
|
5903 |
5891 |
|
|
5892 |
|
5904 |
5893 |
--
|
5905 |
5894 |
-- Name: locationeventcontributor_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5906 |
5895 |
--
|
... | ... | |
5913 |
5902 |
-- Name: locationeventsynonym_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5914 |
5903 |
--
|
5915 |
5904 |
|
5916 |
|
ALTER TABLE locationeventsynonym
|
5917 |
|
ADD CONSTRAINT locationeventsynonym_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5918 |
5905 |
|
5919 |
5906 |
|
|
5907 |
|
5920 |
5908 |
--
|
5921 |
5909 |
-- Name: locationeventsynonym_primarylocationevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5922 |
5910 |
--
|
... | ... | |
5961 |
5949 |
-- Name: namedplace_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5962 |
5950 |
--
|
5963 |
5951 |
|
5964 |
|
ALTER TABLE namedplace
|
5965 |
|
ADD CONSTRAINT namedplace_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5966 |
5952 |
|
5967 |
5953 |
|
|
5954 |
|
5968 |
5955 |
--
|
5969 |
5956 |
-- Name: namedplacecorrelation_childplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5970 |
5957 |
--
|
... | ... | |
5993 |
5980 |
-- Name: note_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
5994 |
5981 |
--
|
5995 |
5982 |
|
5996 |
|
ALTER TABLE note
|
5997 |
|
ADD CONSTRAINT note_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
5998 |
5983 |
|
5999 |
5984 |
|
|
5985 |
|
6000 |
5986 |
--
|
6001 |
5987 |
-- Name: note_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6002 |
5988 |
--
|
... | ... | |
6049 |
6035 |
-- Name: plantconcept_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6050 |
6036 |
--
|
6051 |
6037 |
|
6052 |
|
ALTER TABLE plantconcept
|
6053 |
|
ADD CONSTRAINT plantconcept_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6054 |
6038 |
|
6055 |
6039 |
|
|
6040 |
|
6056 |
6041 |
--
|
6057 |
6042 |
-- Name: plantcorrelation_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6058 |
6043 |
--
|
... | ... | |
6089 |
6074 |
-- Name: plantname_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6090 |
6075 |
--
|
6091 |
6076 |
|
6092 |
|
ALTER TABLE plantname
|
6093 |
|
ADD CONSTRAINT plantname_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6094 |
6077 |
|
6095 |
6078 |
|
|
6079 |
|
6096 |
6080 |
--
|
6097 |
6081 |
-- Name: plantobservation_plant_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6098 |
6082 |
--
|
... | ... | |
6105 |
6089 |
-- Name: plantstatus_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6106 |
6090 |
--
|
6107 |
6091 |
|
6108 |
|
ALTER TABLE plantstatus
|
6109 |
|
ADD CONSTRAINT plantstatus_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6110 |
6092 |
|
6111 |
6093 |
|
|
6094 |
|
6112 |
6095 |
--
|
6113 |
6096 |
-- Name: plantstatus_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6114 |
6097 |
--
|
... | ... | |
6129 |
6112 |
-- Name: plantstatus_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6130 |
6113 |
--
|
6131 |
6114 |
|
6132 |
|
ALTER TABLE plantstatus
|
6133 |
|
ADD CONSTRAINT plantstatus_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6134 |
6115 |
|
6135 |
6116 |
|
|
6117 |
|
6136 |
6118 |
--
|
6137 |
6119 |
-- Name: planttag_plantobservation_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6138 |
6120 |
--
|
... | ... | |
6145 |
6127 |
-- Name: plantusage_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6146 |
6128 |
--
|
6147 |
6129 |
|
6148 |
|
ALTER TABLE plantusage
|
6149 |
|
ADD CONSTRAINT plantusage_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6150 |
6130 |
|
6151 |
6131 |
|
|
6132 |
|
6152 |
6133 |
--
|
6153 |
6134 |
-- Name: plantusage_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6154 |
6135 |
--
|
... | ... | |
6177 |
6158 |
-- Name: project_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6178 |
6159 |
--
|
6179 |
6160 |
|
6180 |
|
ALTER TABLE project
|
6181 |
|
ADD CONSTRAINT project_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6182 |
6161 |
|
6183 |
6162 |
|
|
6163 |
|
6184 |
6164 |
--
|
6185 |
6165 |
-- Name: projectcontributor_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6186 |
6166 |
--
|
6187 |
6167 |
|
6188 |
|
ALTER TABLE projectcontributor
|
6189 |
|
ADD CONSTRAINT projectcontributor_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6190 |
6168 |
|
6191 |
6169 |
|
|
6170 |
|
6192 |
6171 |
--
|
6193 |
6172 |
-- Name: projectcontributor_project_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6194 |
6173 |
--
|
... | ... | |
6273 |
6252 |
-- Name: specimenreplicate_museum_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6274 |
6253 |
--
|
6275 |
6254 |
|
6276 |
|
ALTER TABLE specimenreplicate
|
6277 |
|
ADD CONSTRAINT specimenreplicate_museum_id FOREIGN KEY (museum_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6278 |
6255 |
|
6279 |
6256 |
|
|
6257 |
|
6280 |
6258 |
--
|
6281 |
6259 |
-- Name: specimenreplicate_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6282 |
6260 |
--
|
6283 |
6261 |
|
6284 |
|
ALTER TABLE specimenreplicate
|
6285 |
|
ADD CONSTRAINT specimenreplicate_reference_id_fkey FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6286 |
6262 |
|
6287 |
6263 |
|
|
6264 |
|
6288 |
6265 |
--
|
6289 |
6266 |
-- Name: specimenreplicate_specimen_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6290 |
6267 |
--
|
... | ... | |
6329 |
6306 |
-- Name: stratummethod_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6330 |
6307 |
--
|
6331 |
6308 |
|
6332 |
|
ALTER TABLE stratummethod
|
6333 |
|
ADD CONSTRAINT stratummethod_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6334 |
6309 |
|
6335 |
6310 |
|
|
6311 |
|
6336 |
6312 |
--
|
6337 |
6313 |
-- Name: stratumtype_stratummethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6338 |
6314 |
--
|
... | ... | |
6361 |
6337 |
-- Name: taxondetermination_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6362 |
6338 |
--
|
6363 |
6339 |
|
6364 |
|
ALTER TABLE taxondetermination
|
6365 |
|
ADD CONSTRAINT taxondetermination_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6366 |
6340 |
|
6367 |
6341 |
|
|
6342 |
|
6368 |
6343 |
--
|
6369 |
6344 |
-- Name: taxondetermination_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6370 |
6345 |
--
|
... | ... | |
6377 |
6352 |
-- Name: taxondetermination_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6378 |
6353 |
--
|
6379 |
6354 |
|
6380 |
|
ALTER TABLE taxondetermination
|
6381 |
|
ADD CONSTRAINT taxondetermination_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6382 |
6355 |
|
6383 |
6356 |
|
|
6357 |
|
6384 |
6358 |
--
|
6385 |
6359 |
-- Name: taxondetermination_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6386 |
6360 |
--
|
... | ... | |
6409 |
6383 |
-- Name: taxonoccurrence_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6410 |
6384 |
--
|
6411 |
6385 |
|
6412 |
|
ALTER TABLE taxonoccurrence
|
6413 |
|
ADD CONSTRAINT taxonoccurrence_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6414 |
6386 |
|
6415 |
6387 |
|
|
6388 |
|
6416 |
6389 |
--
|
6417 |
6390 |
-- Name: telephone_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6418 |
6391 |
--
|
... | ... | |
6513 |
6486 |
-- Name: usr_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6514 |
6487 |
--
|
6515 |
6488 |
|
6516 |
|
ALTER TABLE usr
|
6517 |
|
ADD CONSTRAINT usr_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
6518 |
6489 |
|
6519 |
6490 |
|
|
6491 |
|
6520 |
6492 |
--
|
6521 |
6493 |
-- Name: voucher_specimenreplicate_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
6522 |
6494 |
--
|
filter_ERD.csv: Remove fkeys to heavily-linked tables (reference, party)