Revision 486
Added by Aaron Marcuse-Kubitza about 13 years ago
schemas/vegbien.sql | ||
---|---|---|
5650 | 5650 |
|
5651 | 5651 |
|
5652 | 5652 |
-- |
5653 |
-- Name: plot_namedplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5653 |
-- Name: address_organization_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5654 | 5654 |
-- |
5655 | 5655 |
|
5656 |
ALTER TABLE ONLY plot
|
|
5657 |
ADD CONSTRAINT plot_namedplace_id FOREIGN KEY (namedplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5656 |
ALTER TABLE ONLY address
|
|
5657 |
ADD CONSTRAINT address_organization_id FOREIGN KEY (organization_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5658 | 5658 |
|
5659 | 5659 |
|
5660 | 5660 |
-- |
5661 |
-- Name: r10taxondetermination_specimen_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5661 |
-- Name: address_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5662 | 5662 |
-- |
5663 | 5663 |
|
5664 |
ALTER TABLE ONLY taxondetermination
|
|
5665 |
ADD CONSTRAINT r10taxondetermination_specimen_id FOREIGN KEY (specimen_id) REFERENCES specimen(specimen_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5664 |
ALTER TABLE ONLY address
|
|
5665 |
ADD CONSTRAINT address_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5666 | 5666 |
|
5667 | 5667 |
|
5668 | 5668 |
-- |
5669 |
-- Name: r1address_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5669 |
-- Name: aggregateoccurrence_taxonbin_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5670 | 5670 |
-- |
5671 | 5671 |
|
5672 |
ALTER TABLE ONLY address
|
|
5673 |
ADD CONSTRAINT r1address_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5672 |
ALTER TABLE ONLY aggregateoccurrence
|
|
5673 |
ADD CONSTRAINT aggregateoccurrence_taxonbin_id FOREIGN KEY (taxonbin_id) REFERENCES taxonbin(taxonbin_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5674 | 5674 |
|
5675 | 5675 |
|
5676 | 5676 |
-- |
5677 |
-- Name: r1aggregateoccurrence_taxonoccurrence_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5677 |
-- Name: aggregateoccurrence_taxonoccurrence_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
5678 | 5678 |
-- |
5679 | 5679 |
|
5680 | 5680 |
ALTER TABLE ONLY aggregateoccurrence |
5681 |
ADD CONSTRAINT r1aggregateoccurrence_taxonoccurrence_id FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5681 |
ADD CONSTRAINT aggregateoccurrence_taxonoccurrence_id FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
5682 | 5682 |
|
5683 | 5683 |
|
5684 | 5684 |
-- |
5685 |
-- Name: r1classcontributor_commclass_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5685 |
-- Name: classcontributor_commclass_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
5686 | 5686 |
-- |
5687 | 5687 |
|
5688 | 5688 |
ALTER TABLE ONLY classcontributor |
5689 |
ADD CONSTRAINT r1classcontributor_commclass_id FOREIGN KEY (commclass_id) REFERENCES commclass(commclass_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5689 |
ADD CONSTRAINT classcontributor_commclass_id FOREIGN KEY (commclass_id) REFERENCES commclass(commclass_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
5690 | 5690 |
|
5691 | 5691 |
|
5692 | 5692 |
-- |
5693 |
-- Name: r1commclass_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5693 |
-- Name: classcontributor_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5694 | 5694 |
-- |
5695 | 5695 |
|
5696 |
ALTER TABLE ONLY commclass
|
|
5697 |
ADD CONSTRAINT r1commclass_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5696 |
ALTER TABLE ONLY classcontributor
|
|
5697 |
ADD CONSTRAINT classcontributor_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5698 | 5698 |
|
5699 | 5699 |
|
5700 | 5700 |
-- |
5701 |
-- Name: r1commconcept_commname_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5701 |
-- Name: classcontributor_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5702 | 5702 |
-- |
5703 | 5703 |
|
5704 |
ALTER TABLE ONLY commconcept
|
|
5705 |
ADD CONSTRAINT r1commconcept_commname_id FOREIGN KEY (commname_id) REFERENCES commname(commname_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5704 |
ALTER TABLE ONLY classcontributor
|
|
5705 |
ADD CONSTRAINT classcontributor_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5706 | 5706 |
|
5707 | 5707 |
|
5708 | 5708 |
-- |
5709 |
-- Name: r1commcorrelation_commstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5709 |
-- Name: commclass_classpublication_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5710 | 5710 |
-- |
5711 | 5711 |
|
5712 |
ALTER TABLE ONLY commcorrelation
|
|
5713 |
ADD CONSTRAINT r1commcorrelation_commstatus_id FOREIGN KEY (commstatus_id) REFERENCES commstatus(commstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5712 |
ALTER TABLE ONLY commclass
|
|
5713 |
ADD CONSTRAINT commclass_classpublication_id FOREIGN KEY (classpublication_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5714 | 5714 |
|
5715 | 5715 |
|
5716 | 5716 |
-- |
5717 |
-- Name: r1commdetermination_commclass_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5717 |
-- Name: commclass_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5718 | 5718 |
-- |
5719 | 5719 |
|
5720 |
ALTER TABLE ONLY commdetermination
|
|
5721 |
ADD CONSTRAINT r1commdetermination_commclass_id FOREIGN KEY (commclass_id) REFERENCES commclass(commclass_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5720 |
ALTER TABLE ONLY commclass
|
|
5721 |
ADD CONSTRAINT commclass_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5722 | 5722 |
|
5723 | 5723 |
|
5724 | 5724 |
-- |
5725 |
-- Name: r1commlineage_parentcommstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5725 |
-- Name: commconcept_commname_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5726 | 5726 |
-- |
5727 | 5727 |
|
5728 |
ALTER TABLE ONLY commlineage
|
|
5729 |
ADD CONSTRAINT r1commlineage_parentcommstatus_id FOREIGN KEY (parentcommstatus_id) REFERENCES commstatus(commstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5728 |
ALTER TABLE ONLY commconcept
|
|
5729 |
ADD CONSTRAINT commconcept_commname_id FOREIGN KEY (commname_id) REFERENCES commname(commname_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5730 | 5730 |
|
5731 | 5731 |
|
5732 | 5732 |
-- |
5733 |
-- Name: r1commname_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5733 |
-- Name: commconcept_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5734 | 5734 |
-- |
5735 | 5735 |
|
5736 |
ALTER TABLE ONLY commname
|
|
5737 |
ADD CONSTRAINT r1commname_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5736 |
ALTER TABLE ONLY commconcept
|
|
5737 |
ADD CONSTRAINT commconcept_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5738 | 5738 |
|
5739 | 5739 |
|
5740 | 5740 |
-- |
5741 |
-- Name: r1commstatus_commconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5741 |
-- Name: commcorrelation_commconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5742 | 5742 |
-- |
5743 | 5743 |
|
5744 |
ALTER TABLE ONLY commstatus
|
|
5745 |
ADD CONSTRAINT r1commstatus_commconcept_id FOREIGN KEY (commconcept_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5744 |
ALTER TABLE ONLY commcorrelation
|
|
5745 |
ADD CONSTRAINT commcorrelation_commconcept_id FOREIGN KEY (commconcept_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5746 | 5746 |
|
5747 | 5747 |
|
5748 | 5748 |
-- |
5749 |
-- Name: r1commusage_commname_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5749 |
-- Name: commcorrelation_commstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5750 | 5750 |
-- |
5751 | 5751 |
|
5752 |
ALTER TABLE ONLY commusage
|
|
5753 |
ADD CONSTRAINT r1commusage_commname_id FOREIGN KEY (commname_id) REFERENCES commname(commname_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5752 |
ALTER TABLE ONLY commcorrelation
|
|
5753 |
ADD CONSTRAINT commcorrelation_commstatus_id FOREIGN KEY (commstatus_id) REFERENCES commstatus(commstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5754 | 5754 |
|
5755 | 5755 |
|
5756 | 5756 |
-- |
5757 |
-- Name: r1coverindex_covermethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5757 |
-- Name: commdetermination_commauthority_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5758 | 5758 |
-- |
5759 | 5759 |
|
5760 |
ALTER TABLE ONLY coverindex
|
|
5761 |
ADD CONSTRAINT r1coverindex_covermethod_id FOREIGN KEY (covermethod_id) REFERENCES covermethod(covermethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5760 |
ALTER TABLE ONLY commdetermination
|
|
5761 |
ADD CONSTRAINT commdetermination_commauthority_id FOREIGN KEY (commauthority_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5762 | 5762 |
|
5763 | 5763 |
|
5764 | 5764 |
-- |
5765 |
-- Name: r1covermethod_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5765 |
-- Name: commdetermination_commclass_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5766 | 5766 |
-- |
5767 | 5767 |
|
5768 |
ALTER TABLE ONLY covermethod
|
|
5769 |
ADD CONSTRAINT r1covermethod_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5768 |
ALTER TABLE ONLY commdetermination
|
|
5769 |
ADD CONSTRAINT commdetermination_commclass_id FOREIGN KEY (commclass_id) REFERENCES commclass(commclass_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5770 | 5770 |
|
5771 | 5771 |
|
5772 | 5772 |
-- |
5773 |
-- Name: r1definedvalue_userdefined_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5773 |
-- Name: commdetermination_commconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5774 | 5774 |
-- |
5775 | 5775 |
|
5776 |
ALTER TABLE ONLY definedvalue
|
|
5777 |
ADD CONSTRAINT r1definedvalue_userdefined_id FOREIGN KEY (userdefined_id) REFERENCES userdefined(userdefined_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5776 |
ALTER TABLE ONLY commdetermination
|
|
5777 |
ADD CONSTRAINT commdetermination_commconcept_id FOREIGN KEY (commconcept_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5778 | 5778 |
|
5779 | 5779 |
|
5780 | 5780 |
-- |
5781 |
-- Name: r1disturbanceobs_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5781 |
-- Name: commlineage_childcommstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5782 | 5782 |
-- |
5783 | 5783 |
|
5784 |
ALTER TABLE ONLY disturbanceobs
|
|
5785 |
ADD CONSTRAINT r1disturbanceobs_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5784 |
ALTER TABLE ONLY commlineage
|
|
5785 |
ADD CONSTRAINT commlineage_childcommstatus_id FOREIGN KEY (childcommstatus_id) REFERENCES commstatus(commstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5786 | 5786 |
|
5787 | 5787 |
|
5788 | 5788 |
-- |
5789 |
-- Name: r1embargo_plot_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5789 |
-- Name: commlineage_parentcommstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5790 | 5790 |
-- |
5791 | 5791 |
|
5792 |
ALTER TABLE ONLY embargo
|
|
5793 |
ADD CONSTRAINT r1embargo_plot_id FOREIGN KEY (plot_id) REFERENCES plot(plot_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5792 |
ALTER TABLE ONLY commlineage
|
|
5793 |
ADD CONSTRAINT commlineage_parentcommstatus_id FOREIGN KEY (parentcommstatus_id) REFERENCES commstatus(commstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5794 | 5794 |
|
5795 | 5795 |
|
5796 | 5796 |
-- |
5797 |
-- Name: r1graphic_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5797 |
-- Name: commname_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5798 | 5798 |
-- |
5799 | 5799 |
|
5800 |
ALTER TABLE ONLY graphic
|
|
5801 |
ADD CONSTRAINT r1graphic_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5800 |
ALTER TABLE ONLY commname
|
|
5801 |
ADD CONSTRAINT commname_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5802 | 5802 |
|
5803 | 5803 |
|
5804 | 5804 |
-- |
5805 |
-- Name: r1individualplant_aggregateoccurrence_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5805 |
-- Name: commstatus_commconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5806 | 5806 |
-- |
5807 | 5807 |
|
5808 |
ALTER TABLE ONLY individualplant
|
|
5809 |
ADD CONSTRAINT r1individualplant_aggregateoccurrence_id FOREIGN KEY (aggregateoccurrence_id) REFERENCES aggregateoccurrence(aggregateoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5808 |
ALTER TABLE ONLY commstatus
|
|
5809 |
ADD CONSTRAINT commstatus_commconcept_id FOREIGN KEY (commconcept_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5810 | 5810 |
|
5811 | 5811 |
|
5812 | 5812 |
-- |
5813 |
-- Name: r1namedplace_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5813 |
-- Name: commstatus_commparent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5814 | 5814 |
-- |
5815 | 5815 |
|
5816 |
ALTER TABLE ONLY namedplace
|
|
5817 |
ADD CONSTRAINT r1namedplace_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5816 |
ALTER TABLE ONLY commstatus
|
|
5817 |
ADD CONSTRAINT commstatus_commparent_id FOREIGN KEY (commparent_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5818 | 5818 |
|
5819 | 5819 |
|
5820 | 5820 |
-- |
5821 |
-- Name: r1namedplacecorrelation_parentplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5821 |
-- Name: commstatus_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5822 | 5822 |
-- |
5823 | 5823 |
|
5824 |
ALTER TABLE ONLY namedplacecorrelation
|
|
5825 |
ADD CONSTRAINT r1namedplacecorrelation_parentplace_id FOREIGN KEY (parentplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5824 |
ALTER TABLE ONLY commstatus
|
|
5825 |
ADD CONSTRAINT commstatus_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5826 | 5826 |
|
5827 | 5827 |
|
5828 | 5828 |
-- |
5829 |
-- Name: r1note_notelink_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5829 |
-- Name: commstatus_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5830 | 5830 |
-- |
5831 | 5831 |
|
5832 |
ALTER TABLE ONLY note
|
|
5833 |
ADD CONSTRAINT r1note_notelink_id FOREIGN KEY (notelink_id) REFERENCES notelink(notelink_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5832 |
ALTER TABLE ONLY commstatus
|
|
5833 |
ADD CONSTRAINT commstatus_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5834 | 5834 |
|
5835 | 5835 |
|
5836 | 5836 |
-- |
5837 |
-- Name: r1party_currentname_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5837 |
-- Name: commusage_commconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5838 | 5838 |
-- |
5839 | 5839 |
|
5840 |
ALTER TABLE ONLY party
|
|
5841 |
ADD CONSTRAINT r1party_currentname_id FOREIGN KEY (currentname_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5840 |
ALTER TABLE ONLY commusage
|
|
5841 |
ADD CONSTRAINT commusage_commconcept_id FOREIGN KEY (commconcept_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5842 | 5842 |
|
5843 | 5843 |
|
5844 | 5844 |
-- |
5845 |
-- Name: r1partymember_parentparty_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5845 |
-- Name: commusage_commname_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5846 | 5846 |
-- |
5847 | 5847 |
|
5848 |
ALTER TABLE ONLY partymember
|
|
5849 |
ADD CONSTRAINT r1partymember_parentparty_id FOREIGN KEY (parentparty_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5848 |
ALTER TABLE ONLY commusage
|
|
5849 |
ADD CONSTRAINT commusage_commname_id FOREIGN KEY (commname_id) REFERENCES commname(commname_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5850 | 5850 |
|
5851 | 5851 |
|
5852 | 5852 |
-- |
5853 |
-- Name: r1place_plot_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5853 |
-- Name: commusage_commstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5854 | 5854 |
-- |
5855 | 5855 |
|
5856 |
ALTER TABLE ONLY place
|
|
5857 |
ADD CONSTRAINT r1place_plot_id FOREIGN KEY (plot_id) REFERENCES plot(plot_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5856 |
ALTER TABLE ONLY commusage
|
|
5857 |
ADD CONSTRAINT commusage_commstatus_id FOREIGN KEY (commstatus_id) REFERENCES commstatus(commstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5858 | 5858 |
|
5859 | 5859 |
|
5860 | 5860 |
-- |
5861 |
-- Name: r1plantconcept_plantname_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5861 |
-- Name: commusage_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5862 | 5862 |
-- |
5863 | 5863 |
|
5864 |
ALTER TABLE ONLY plantconcept
|
|
5865 |
ADD CONSTRAINT r1plantconcept_plantname_id FOREIGN KEY (plantname_id) REFERENCES plantname(plantname_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5864 |
ALTER TABLE ONLY commusage
|
|
5865 |
ADD CONSTRAINT commusage_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5866 | 5866 |
|
5867 | 5867 |
|
5868 | 5868 |
-- |
5869 |
-- Name: r1plantcorrelation_plantstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5869 |
-- Name: coverindex_covermethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5870 | 5870 |
-- |
5871 | 5871 |
|
5872 |
ALTER TABLE ONLY plantcorrelation
|
|
5873 |
ADD CONSTRAINT r1plantcorrelation_plantstatus_id FOREIGN KEY (plantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5872 |
ALTER TABLE ONLY coverindex
|
|
5873 |
ADD CONSTRAINT coverindex_covermethod_id FOREIGN KEY (covermethod_id) REFERENCES covermethod(covermethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5874 | 5874 |
|
5875 | 5875 |
|
5876 | 5876 |
-- |
5877 |
-- Name: r1plantlineage_childplantstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5877 |
-- Name: covermethod_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5878 | 5878 |
-- |
5879 | 5879 |
|
5880 |
ALTER TABLE ONLY plantlineage
|
|
5881 |
ADD CONSTRAINT r1plantlineage_childplantstatus_id FOREIGN KEY (childplantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5880 |
ALTER TABLE ONLY covermethod
|
|
5881 |
ADD CONSTRAINT covermethod_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5882 | 5882 |
|
5883 | 5883 |
|
5884 | 5884 |
-- |
5885 |
-- Name: r1plantname_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5885 |
-- Name: definedvalue_userdefined_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5886 | 5886 |
-- |
5887 | 5887 |
|
5888 |
ALTER TABLE ONLY plantname
|
|
5889 |
ADD CONSTRAINT r1plantname_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5888 |
ALTER TABLE ONLY definedvalue
|
|
5889 |
ADD CONSTRAINT definedvalue_userdefined_id FOREIGN KEY (userdefined_id) REFERENCES userdefined(userdefined_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5890 | 5890 |
|
5891 | 5891 |
|
5892 | 5892 |
-- |
5893 |
-- Name: r1plantstatus_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5893 |
-- Name: disturbanceobs_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5894 | 5894 |
-- |
5895 | 5895 |
|
5896 |
ALTER TABLE ONLY plantstatus
|
|
5897 |
ADD CONSTRAINT r1plantstatus_plantconcept_id FOREIGN KEY (plantconcept_id) REFERENCES plantconcept(plantconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5896 |
ALTER TABLE ONLY disturbanceobs
|
|
5897 |
ADD CONSTRAINT disturbanceobs_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5898 | 5898 |
|
5899 | 5899 |
|
5900 | 5900 |
-- |
5901 |
-- Name: r1plantusage_plantname_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5901 |
-- Name: embargo_plot_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5902 | 5902 |
-- |
5903 | 5903 |
|
5904 |
ALTER TABLE ONLY plantusage
|
|
5905 |
ADD CONSTRAINT r1plantusage_plantname_id FOREIGN KEY (plantname_id) REFERENCES plantname(plantname_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5904 |
ALTER TABLE ONLY embargo
|
|
5905 |
ADD CONSTRAINT embargo_plot_id FOREIGN KEY (plot_id) REFERENCES plot(plot_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5906 | 5906 |
|
5907 | 5907 |
|
5908 | 5908 |
-- |
5909 |
-- Name: r1plot_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5909 |
-- Name: graphic_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5910 | 5910 |
-- |
5911 | 5911 |
|
5912 |
ALTER TABLE ONLY plot
|
|
5913 |
ADD CONSTRAINT r1plot_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5912 |
ALTER TABLE ONLY graphic
|
|
5913 |
ADD CONSTRAINT graphic_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5914 | 5914 |
|
5915 | 5915 |
|
5916 | 5916 |
-- |
5917 |
-- Name: r1plotevent_previousobs_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5917 |
-- Name: individualplant_aggregateoccurrence_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5918 | 5918 |
-- |
5919 | 5919 |
|
5920 |
ALTER TABLE ONLY plotevent
|
|
5921 |
ADD CONSTRAINT r1plotevent_previousobs_id FOREIGN KEY (previous_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5920 |
ALTER TABLE ONLY individualplant
|
|
5921 |
ADD CONSTRAINT individualplant_aggregateoccurrence_id FOREIGN KEY (aggregateoccurrence_id) REFERENCES aggregateoccurrence(aggregateoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5922 | 5922 |
|
5923 | 5923 |
|
5924 | 5924 |
-- |
5925 |
-- Name: r1ploteventcontributor_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5925 |
-- Name: namedplace_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5926 | 5926 |
-- |
5927 | 5927 |
|
5928 |
ALTER TABLE ONLY ploteventcontributor
|
|
5929 |
ADD CONSTRAINT r1ploteventcontributor_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5928 |
ALTER TABLE ONLY namedplace
|
|
5929 |
ADD CONSTRAINT namedplace_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5930 | 5930 |
|
5931 | 5931 |
|
5932 | 5932 |
-- |
5933 |
-- Name: r1ploteventsynonym_synonymplotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5933 |
-- Name: namedplacecorrelation_childplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5934 | 5934 |
-- |
5935 | 5935 |
|
5936 |
ALTER TABLE ONLY ploteventsynonym
|
|
5937 |
ADD CONSTRAINT r1ploteventsynonym_synonymplotevent_id FOREIGN KEY (synonymplotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5936 |
ALTER TABLE ONLY namedplacecorrelation
|
|
5937 |
ADD CONSTRAINT namedplacecorrelation_childplace_id FOREIGN KEY (childplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5938 | 5938 |
|
5939 | 5939 |
|
5940 | 5940 |
-- |
5941 |
-- Name: r1projectcontributor_project_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5941 |
-- Name: namedplacecorrelation_parentplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5942 | 5942 |
-- |
5943 | 5943 |
|
5944 |
ALTER TABLE ONLY projectcontributor
|
|
5945 |
ADD CONSTRAINT r1projectcontributor_project_id FOREIGN KEY (project_id) REFERENCES project(project_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5944 |
ALTER TABLE ONLY namedplacecorrelation
|
|
5945 |
ADD CONSTRAINT namedplacecorrelation_parentplace_id FOREIGN KEY (parentplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5946 | 5946 |
|
5947 | 5947 |
|
5948 | 5948 |
-- |
5949 |
-- Name: r1reference_referencejournal_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5949 |
-- Name: note_notelink_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5950 | 5950 |
-- |
5951 | 5951 |
|
5952 |
ALTER TABLE ONLY reference
|
|
5953 |
ADD CONSTRAINT r1reference_referencejournal_id FOREIGN KEY (referencejournal_id) REFERENCES referencejournal(referencejournal_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5952 |
ALTER TABLE ONLY note
|
|
5953 |
ADD CONSTRAINT note_notelink_id FOREIGN KEY (notelink_id) REFERENCES notelink(notelink_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5954 | 5954 |
|
5955 | 5955 |
|
5956 | 5956 |
-- |
5957 |
-- Name: r1referencealtident_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5957 |
-- Name: note_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5958 | 5958 |
-- |
5959 | 5959 |
|
5960 |
ALTER TABLE ONLY referencealtident
|
|
5961 |
ADD CONSTRAINT r1referencealtident_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5960 |
ALTER TABLE ONLY note
|
|
5961 |
ADD CONSTRAINT note_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5962 | 5962 |
|
5963 | 5963 |
|
5964 | 5964 |
-- |
5965 |
-- Name: r1referencecontributor_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5965 |
-- Name: note_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5966 | 5966 |
-- |
5967 | 5967 |
|
5968 |
ALTER TABLE ONLY referencecontributor
|
|
5969 |
ADD CONSTRAINT r1referencecontributor_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5968 |
ALTER TABLE ONLY note
|
|
5969 |
ADD CONSTRAINT note_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5970 | 5970 |
|
5971 | 5971 |
|
5972 | 5972 |
-- |
5973 |
-- Name: r1referenceparty_currentparty_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5973 |
-- Name: party_currentname_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5974 | 5974 |
-- |
5975 | 5975 |
|
5976 |
ALTER TABLE ONLY referenceparty
|
|
5977 |
ADD CONSTRAINT r1referenceparty_currentparty_id FOREIGN KEY (currentparty_id) REFERENCES referenceparty(referenceparty_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5976 |
ALTER TABLE ONLY party |
|
5977 |
ADD CONSTRAINT party_currentname_id FOREIGN KEY (currentname_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5978 | 5978 |
|
5979 | 5979 |
|
5980 | 5980 |
-- |
5981 |
-- Name: r1revision_previousrevision_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5981 |
-- Name: partymember_childparty_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5982 | 5982 |
-- |
5983 | 5983 |
|
5984 |
ALTER TABLE ONLY revision
|
|
5985 |
ADD CONSTRAINT r1revision_previousrevision_id FOREIGN KEY (previousrevision_id) REFERENCES revision(revision_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5984 |
ALTER TABLE ONLY partymember
|
|
5985 |
ADD CONSTRAINT partymember_childparty_id FOREIGN KEY (childparty_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5986 | 5986 |
|
5987 | 5987 |
|
5988 | 5988 |
-- |
5989 |
-- Name: r1soilobs_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5989 |
-- Name: partymember_parentparty_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5990 | 5990 |
-- |
5991 | 5991 |
|
5992 |
ALTER TABLE ONLY soilobs
|
|
5993 |
ADD CONSTRAINT r1soilobs_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5992 |
ALTER TABLE ONLY partymember
|
|
5993 |
ADD CONSTRAINT partymember_parentparty_id FOREIGN KEY (parentparty_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
5994 | 5994 |
|
5995 | 5995 |
|
5996 | 5996 |
-- |
5997 |
-- Name: r1soiltaxon_soilparent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5997 |
-- Name: partymember_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
5998 | 5998 |
-- |
5999 | 5999 |
|
6000 |
ALTER TABLE ONLY soiltaxon
|
|
6001 |
ADD CONSTRAINT r1soiltaxon_soilparent_id FOREIGN KEY (soilparent_id) REFERENCES soiltaxon(soiltaxon_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6000 |
ALTER TABLE ONLY partymember
|
|
6001 |
ADD CONSTRAINT partymember_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6002 | 6002 |
|
6003 | 6003 |
|
6004 | 6004 |
-- |
6005 |
-- Name: r1stemobservation_individualplant_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6005 |
-- Name: place_namedplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6006 | 6006 |
-- |
6007 | 6007 |
|
6008 |
ALTER TABLE ONLY stemobservation
|
|
6009 |
ADD CONSTRAINT r1stemobservation_individualplant_id FOREIGN KEY (individualplant_id) REFERENCES individualplant(individualplant_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6008 |
ALTER TABLE ONLY place
|
|
6009 |
ADD CONSTRAINT place_namedplace_id FOREIGN KEY (namedplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6010 | 6010 |
|
6011 | 6011 |
|
6012 | 6012 |
-- |
6013 |
-- Name: r1stratum_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6013 |
-- Name: place_plot_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6014 | 6014 |
-- |
6015 | 6015 |
|
6016 |
ALTER TABLE ONLY stratum
|
|
6017 |
ADD CONSTRAINT r1stratum_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6016 |
ALTER TABLE ONLY place
|
|
6017 |
ADD CONSTRAINT place_plot_id FOREIGN KEY (plot_id) REFERENCES plot(plot_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6018 | 6018 |
|
6019 | 6019 |
|
6020 | 6020 |
-- |
6021 |
-- Name: r1stratummethod_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6021 |
-- Name: plantconcept_plantname_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6022 | 6022 |
-- |
6023 | 6023 |
|
6024 |
ALTER TABLE ONLY stratummethod
|
|
6025 |
ADD CONSTRAINT r1stratummethod_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6024 |
ALTER TABLE ONLY plantconcept
|
|
6025 |
ADD CONSTRAINT plantconcept_plantname_id FOREIGN KEY (plantname_id) REFERENCES plantname(plantname_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6026 | 6026 |
|
6027 | 6027 |
|
6028 | 6028 |
-- |
6029 |
-- Name: r1stratumtype_stratummethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6029 |
-- Name: plantconcept_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6030 | 6030 |
-- |
6031 | 6031 |
|
6032 |
ALTER TABLE ONLY stratumtype
|
|
6033 |
ADD CONSTRAINT r1stratumtype_stratummethod_id FOREIGN KEY (stratummethod_id) REFERENCES stratummethod(stratummethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6032 |
ALTER TABLE ONLY plantconcept
|
|
6033 |
ADD CONSTRAINT plantconcept_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6034 | 6034 |
|
6035 | 6035 |
|
6036 | 6036 |
-- |
6037 |
-- Name: r1taxonalt_taxondetermination_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6037 |
-- Name: plantcorrelation_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6038 | 6038 |
-- |
6039 | 6039 |
|
6040 |
ALTER TABLE ONLY taxonalt
|
|
6041 |
ADD CONSTRAINT r1taxonalt_taxondetermination_id FOREIGN KEY (taxondetermination_id) REFERENCES taxondetermination(taxondetermination_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6040 |
ALTER TABLE ONLY plantcorrelation
|
|
6041 |
ADD CONSTRAINT plantcorrelation_plantconcept_id FOREIGN KEY (plantconcept_id) REFERENCES plantconcept(plantconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6042 | 6042 |
|
6043 | 6043 |
|
6044 | 6044 |
-- |
6045 |
-- Name: r1taxondetermination_taxonoccurrence_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6045 |
-- Name: plantcorrelation_plantstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6046 | 6046 |
-- |
6047 | 6047 |
|
6048 |
ALTER TABLE ONLY taxondetermination
|
|
6049 |
ADD CONSTRAINT r1taxondetermination_taxonoccurrence_id FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6048 |
ALTER TABLE ONLY plantcorrelation
|
|
6049 |
ADD CONSTRAINT plantcorrelation_plantstatus_id FOREIGN KEY (plantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6050 | 6050 |
|
6051 | 6051 |
|
6052 | 6052 |
-- |
6053 |
-- Name: r1taxonoccurrence_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6053 |
-- Name: plantlineage_childplantstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6054 | 6054 |
-- |
6055 | 6055 |
|
6056 |
ALTER TABLE ONLY taxonoccurrence
|
|
6057 |
ADD CONSTRAINT r1taxonoccurrence_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6056 |
ALTER TABLE ONLY plantlineage
|
|
6057 |
ADD CONSTRAINT plantlineage_childplantstatus_id FOREIGN KEY (childplantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6058 | 6058 |
|
6059 | 6059 |
|
6060 | 6060 |
-- |
6061 |
-- Name: r1telephone_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6061 |
-- Name: plantlineage_parentplantstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6062 | 6062 |
-- |
6063 | 6063 |
|
6064 |
ALTER TABLE ONLY telephone
|
|
6065 |
ADD CONSTRAINT r1telephone_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6064 |
ALTER TABLE ONLY plantlineage
|
|
6065 |
ADD CONSTRAINT plantlineage_parentplantstatus_id FOREIGN KEY (parentplantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6066 | 6066 |
|
6067 | 6067 |
|
6068 | 6068 |
-- |
6069 |
-- Name: r1usercertification_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6069 |
-- Name: plantname_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6070 | 6070 |
-- |
6071 | 6071 |
|
6072 |
ALTER TABLE ONLY usercertification
|
|
6073 |
ADD CONSTRAINT r1usercertification_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6072 |
ALTER TABLE ONLY plantname
|
|
6073 |
ADD CONSTRAINT plantname_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6074 | 6074 |
|
6075 | 6075 |
|
6076 | 6076 |
-- |
6077 |
-- Name: r1userdataset_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6077 |
-- Name: plantstatus_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6078 | 6078 |
-- |
6079 | 6079 |
|
6080 |
ALTER TABLE ONLY userdataset
|
|
6081 |
ADD CONSTRAINT r1userdataset_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6080 |
ALTER TABLE ONLY plantstatus
|
|
6081 |
ADD CONSTRAINT plantstatus_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6082 | 6082 |
|
6083 | 6083 |
|
6084 | 6084 |
-- |
6085 |
-- Name: r1userdatasetitem_userdataset_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6085 |
-- Name: plantstatus_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6086 | 6086 |
-- |
6087 | 6087 |
|
6088 |
ALTER TABLE ONLY userdatasetitem
|
|
6089 |
ADD CONSTRAINT r1userdatasetitem_userdataset_id FOREIGN KEY (userdataset_id) REFERENCES userdataset(userdataset_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6088 |
ALTER TABLE ONLY plantstatus
|
|
6089 |
ADD CONSTRAINT plantstatus_plantconcept_id FOREIGN KEY (plantconcept_id) REFERENCES plantconcept(plantconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6090 | 6090 |
|
6091 | 6091 |
|
6092 | 6092 |
-- |
6093 |
-- Name: r1usernotify_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6093 |
-- Name: plantstatus_plantparent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6094 | 6094 |
-- |
6095 | 6095 |
|
6096 |
ALTER TABLE ONLY usernotify
|
|
6097 |
ADD CONSTRAINT r1usernotify_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6096 |
ALTER TABLE ONLY plantstatus
|
|
6097 |
ADD CONSTRAINT plantstatus_plantparent_id FOREIGN KEY (plantparent_id) REFERENCES plantconcept(plantconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6098 | 6098 |
|
6099 | 6099 |
|
6100 | 6100 |
-- |
6101 |
-- Name: r1userpermission_embargo_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6101 |
-- Name: plantstatus_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6102 | 6102 |
-- |
6103 | 6103 |
|
6104 |
ALTER TABLE ONLY userpermission
|
|
6105 |
ADD CONSTRAINT r1userpermission_embargo_id FOREIGN KEY (embargo_id) REFERENCES embargo(embargo_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6104 |
ALTER TABLE ONLY plantstatus
|
|
6105 |
ADD CONSTRAINT plantstatus_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6106 | 6106 |
|
6107 | 6107 |
|
6108 | 6108 |
-- |
6109 |
-- Name: r1userpreference_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6109 |
-- Name: plantusage_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6110 | 6110 |
-- |
6111 | 6111 |
|
6112 |
ALTER TABLE ONLY userpreference
|
|
6113 |
ADD CONSTRAINT r1userpreference_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6112 |
ALTER TABLE ONLY plantusage
|
|
6113 |
ADD CONSTRAINT plantusage_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6114 | 6114 |
|
6115 | 6115 |
|
6116 | 6116 |
-- |
6117 |
-- Name: r1userquery_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6117 |
-- Name: plantusage_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6118 | 6118 |
-- |
6119 | 6119 |
|
6120 |
ALTER TABLE ONLY userquery
|
|
6121 |
ADD CONSTRAINT r1userquery_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6120 |
ALTER TABLE ONLY plantusage
|
|
6121 |
ADD CONSTRAINT plantusage_plantconcept_id FOREIGN KEY (plantconcept_id) REFERENCES plantconcept(plantconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6122 | 6122 |
|
6123 | 6123 |
|
6124 | 6124 |
-- |
6125 |
-- Name: r1userrecordowner_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6125 |
-- Name: plantusage_plantname_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6126 | 6126 |
-- |
6127 | 6127 |
|
6128 |
ALTER TABLE ONLY userrecordowner
|
|
6129 |
ADD CONSTRAINT r1userrecordowner_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6128 |
ALTER TABLE ONLY plantusage
|
|
6129 |
ADD CONSTRAINT plantusage_plantname_id FOREIGN KEY (plantname_id) REFERENCES plantname(plantname_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6130 | 6130 |
|
6131 | 6131 |
|
6132 | 6132 |
-- |
6133 |
-- Name: r1userregionalexp_usercertification_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6133 |
-- Name: plantusage_plantstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6134 | 6134 |
-- |
6135 | 6135 |
|
6136 |
ALTER TABLE ONLY userregionalexp
|
|
6137 |
ADD CONSTRAINT r1userregionalexp_usercertification_id FOREIGN KEY (usercertification_id) REFERENCES usercertification(usercertification_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6136 |
ALTER TABLE ONLY plantusage
|
|
6137 |
ADD CONSTRAINT plantusage_plantstatus_id FOREIGN KEY (plantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6138 | 6138 |
|
6139 | 6139 |
|
6140 | 6140 |
-- |
6141 |
-- Name: r1usr_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6141 |
-- Name: plot_namedplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6142 | 6142 |
-- |
6143 | 6143 |
|
6144 |
ALTER TABLE ONLY usr
|
|
6145 |
ADD CONSTRAINT r1usr_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6144 |
ALTER TABLE ONLY plot
|
|
6145 |
ADD CONSTRAINT plot_namedplace_id FOREIGN KEY (namedplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6146 | 6146 |
|
6147 | 6147 |
|
6148 | 6148 |
-- |
6149 |
-- Name: r2address_organization_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6149 |
-- Name: plot_parent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6150 | 6150 |
-- |
6151 | 6151 |
|
6152 |
ALTER TABLE ONLY address
|
|
6153 |
ADD CONSTRAINT r2address_organization_id FOREIGN KEY (organization_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6152 |
ALTER TABLE ONLY plot
|
|
6153 |
ADD CONSTRAINT plot_parent_id FOREIGN KEY (parent_id) REFERENCES plot(plot_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6154 | 6154 |
|
6155 | 6155 |
|
6156 | 6156 |
-- |
6157 |
-- Name: r2aggregateoccurrence_taxonbin_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6157 |
-- Name: plot_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6158 | 6158 |
-- |
6159 | 6159 |
|
6160 |
ALTER TABLE ONLY aggregateoccurrence
|
|
6161 |
ADD CONSTRAINT r2aggregateoccurrence_taxonbin_id FOREIGN KEY (taxonbin_id) REFERENCES taxonbin(taxonbin_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6160 |
ALTER TABLE ONLY plot
|
|
6161 |
ADD CONSTRAINT plot_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6162 | 6162 |
|
6163 | 6163 |
|
6164 | 6164 |
-- |
6165 |
-- Name: r2classcontributor_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6165 |
-- Name: plotevent_covermethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6166 | 6166 |
-- |
6167 | 6167 |
|
6168 |
ALTER TABLE ONLY classcontributor
|
|
6169 |
ADD CONSTRAINT r2classcontributor_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6168 |
ALTER TABLE ONLY plotevent
|
|
6169 |
ADD CONSTRAINT plotevent_covermethod_id FOREIGN KEY (covermethod_id) REFERENCES covermethod(covermethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6170 | 6170 |
|
6171 | 6171 |
|
6172 | 6172 |
-- |
6173 |
-- Name: r2commclass_classpublication_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6173 |
-- Name: plotevent_plot_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6174 | 6174 |
-- |
6175 | 6175 |
|
6176 |
ALTER TABLE ONLY commclass
|
|
6177 |
ADD CONSTRAINT r2commclass_classpublication_id FOREIGN KEY (classpublication_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6176 |
ALTER TABLE ONLY plotevent
|
|
6177 |
ADD CONSTRAINT plotevent_plot_id FOREIGN KEY (plot_id) REFERENCES plot(plot_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6178 | 6178 |
|
6179 | 6179 |
|
6180 | 6180 |
-- |
6181 |
-- Name: r2commconcept_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6181 |
-- Name: plotevent_previousobs_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6182 | 6182 |
-- |
6183 | 6183 |
|
6184 |
ALTER TABLE ONLY commconcept
|
|
6185 |
ADD CONSTRAINT r2commconcept_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6184 |
ALTER TABLE ONLY plotevent
|
|
6185 |
ADD CONSTRAINT plotevent_previousobs_id FOREIGN KEY (previous_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6186 | 6186 |
|
6187 | 6187 |
|
6188 | 6188 |
-- |
6189 |
-- Name: r2commcorrelation_commconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6189 |
-- Name: plotevent_project_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6190 | 6190 |
-- |
6191 | 6191 |
|
6192 |
ALTER TABLE ONLY commcorrelation
|
|
6193 |
ADD CONSTRAINT r2commcorrelation_commconcept_id FOREIGN KEY (commconcept_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6192 |
ALTER TABLE ONLY plotevent
|
|
6193 |
ADD CONSTRAINT plotevent_project_id FOREIGN KEY (project_id) REFERENCES project(project_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6194 | 6194 |
|
6195 | 6195 |
|
6196 | 6196 |
-- |
6197 |
-- Name: r2commdetermination_commconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6197 |
-- Name: plotevent_soiltaxon_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6198 | 6198 |
-- |
6199 | 6199 |
|
6200 |
ALTER TABLE ONLY commdetermination
|
|
6201 |
ADD CONSTRAINT r2commdetermination_commconcept_id FOREIGN KEY (commconcept_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6200 |
ALTER TABLE ONLY plotevent
|
|
6201 |
ADD CONSTRAINT plotevent_soiltaxon_id FOREIGN KEY (soiltaxon_id) REFERENCES soiltaxon(soiltaxon_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6202 | 6202 |
|
6203 | 6203 |
|
6204 | 6204 |
-- |
6205 |
-- Name: r2commlineage_childcommstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6205 |
-- Name: plotevent_stratummethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6206 | 6206 |
-- |
6207 | 6207 |
|
6208 |
ALTER TABLE ONLY commlineage
|
|
6209 |
ADD CONSTRAINT r2commlineage_childcommstatus_id FOREIGN KEY (childcommstatus_id) REFERENCES commstatus(commstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6208 |
ALTER TABLE ONLY plotevent
|
|
6209 |
ADD CONSTRAINT plotevent_stratummethod_id FOREIGN KEY (stratummethod_id) REFERENCES stratummethod(stratummethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6210 | 6210 |
|
6211 | 6211 |
|
6212 | 6212 |
-- |
6213 |
-- Name: r2commstatus_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6213 |
-- Name: ploteventcontributor_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6214 | 6214 |
-- |
6215 | 6215 |
|
6216 |
ALTER TABLE ONLY commstatus
|
|
6217 |
ADD CONSTRAINT r2commstatus_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6216 |
ALTER TABLE ONLY ploteventcontributor
|
|
6217 |
ADD CONSTRAINT ploteventcontributor_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6218 | 6218 |
|
6219 | 6219 |
|
6220 | 6220 |
-- |
6221 |
-- Name: r2commusage_commconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6221 |
-- Name: ploteventcontributor_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6222 | 6222 |
-- |
6223 | 6223 |
|
6224 |
ALTER TABLE ONLY commusage
|
|
6225 |
ADD CONSTRAINT r2commusage_commconcept_id FOREIGN KEY (commconcept_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6224 |
ALTER TABLE ONLY ploteventcontributor
|
|
6225 |
ADD CONSTRAINT ploteventcontributor_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6226 | 6226 |
|
6227 | 6227 |
|
6228 | 6228 |
-- |
6229 |
-- Name: r2namedplacecorrelation_childplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6229 |
-- Name: ploteventcontributor_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6230 | 6230 |
-- |
6231 | 6231 |
|
6232 |
ALTER TABLE ONLY namedplacecorrelation
|
|
6233 |
ADD CONSTRAINT r2namedplacecorrelation_childplace_id FOREIGN KEY (childplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6232 |
ALTER TABLE ONLY ploteventcontributor
|
|
6233 |
ADD CONSTRAINT ploteventcontributor_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6234 | 6234 |
|
6235 | 6235 |
|
6236 | 6236 |
-- |
6237 |
-- Name: r2note_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6237 |
-- Name: ploteventsynonym_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6238 | 6238 |
-- |
6239 | 6239 |
|
6240 |
ALTER TABLE ONLY note
|
|
6241 |
ADD CONSTRAINT r2note_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6240 |
ALTER TABLE ONLY ploteventsynonym
|
|
6241 |
ADD CONSTRAINT ploteventsynonym_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6242 | 6242 |
|
6243 | 6243 |
|
6244 | 6244 |
-- |
6245 |
-- Name: r2partymember_childparty_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6245 |
-- Name: ploteventsynonym_primaryplotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6246 | 6246 |
-- |
6247 | 6247 |
|
6248 |
ALTER TABLE ONLY partymember
|
|
6249 |
ADD CONSTRAINT r2partymember_childparty_id FOREIGN KEY (childparty_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6248 |
ALTER TABLE ONLY ploteventsynonym
|
|
6249 |
ADD CONSTRAINT ploteventsynonym_primaryplotevent_id FOREIGN KEY (primaryplotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6250 | 6250 |
|
6251 | 6251 |
|
6252 | 6252 |
-- |
6253 |
-- Name: r2place_namedplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6253 |
-- Name: ploteventsynonym_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6254 | 6254 |
-- |
6255 | 6255 |
|
6256 |
ALTER TABLE ONLY place
|
|
6257 |
ADD CONSTRAINT r2place_namedplace_id FOREIGN KEY (namedplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6256 |
ALTER TABLE ONLY ploteventsynonym
|
|
6257 |
ADD CONSTRAINT ploteventsynonym_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6258 | 6258 |
|
6259 | 6259 |
|
6260 | 6260 |
-- |
6261 |
-- Name: r2plantconcept_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6261 |
-- Name: ploteventsynonym_synonymplotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6262 | 6262 |
-- |
6263 | 6263 |
|
6264 |
ALTER TABLE ONLY plantconcept
|
|
6265 |
ADD CONSTRAINT r2plantconcept_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6264 |
ALTER TABLE ONLY ploteventsynonym
|
|
6265 |
ADD CONSTRAINT ploteventsynonym_synonymplotevent_id FOREIGN KEY (synonymplotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6266 | 6266 |
|
6267 | 6267 |
|
6268 | 6268 |
-- |
6269 |
-- Name: r2plantcorrelation_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6269 |
-- Name: projectcontributor_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6270 | 6270 |
-- |
6271 | 6271 |
|
6272 |
ALTER TABLE ONLY plantcorrelation
|
|
6273 |
ADD CONSTRAINT r2plantcorrelation_plantconcept_id FOREIGN KEY (plantconcept_id) REFERENCES plantconcept(plantconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6272 |
ALTER TABLE ONLY projectcontributor
|
|
6273 |
ADD CONSTRAINT projectcontributor_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6274 | 6274 |
|
6275 | 6275 |
|
6276 | 6276 |
-- |
6277 |
-- Name: r2plantlineage_parentplantstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6277 |
-- Name: projectcontributor_project_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6278 | 6278 |
-- |
6279 | 6279 |
|
6280 |
ALTER TABLE ONLY plantlineage
|
|
6281 |
ADD CONSTRAINT r2plantlineage_parentplantstatus_id FOREIGN KEY (parentplantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6280 |
ALTER TABLE ONLY projectcontributor
|
|
6281 |
ADD CONSTRAINT projectcontributor_project_id FOREIGN KEY (project_id) REFERENCES project(project_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6282 | 6282 |
|
6283 | 6283 |
|
6284 | 6284 |
-- |
6285 |
-- Name: r2plantstatus_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6285 |
-- Name: projectcontributor_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6286 | 6286 |
-- |
6287 | 6287 |
|
6288 |
ALTER TABLE ONLY plantstatus
|
|
6289 |
ADD CONSTRAINT r2plantstatus_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6288 |
ALTER TABLE ONLY projectcontributor
|
|
6289 |
ADD CONSTRAINT projectcontributor_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6290 | 6290 |
|
6291 | 6291 |
|
6292 | 6292 |
-- |
6293 |
-- Name: r2plantusage_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6293 |
-- Name: reference_referencejournal_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6294 | 6294 |
-- |
6295 | 6295 |
|
6296 |
ALTER TABLE ONLY plantusage
|
|
6297 |
ADD CONSTRAINT r2plantusage_plantconcept_id FOREIGN KEY (plantconcept_id) REFERENCES plantconcept(plantconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6296 |
ALTER TABLE ONLY reference
|
|
6297 |
ADD CONSTRAINT reference_referencejournal_id FOREIGN KEY (referencejournal_id) REFERENCES referencejournal(referencejournal_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6298 | 6298 |
|
6299 | 6299 |
|
6300 | 6300 |
-- |
6301 |
-- Name: r2plot_parent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6301 |
-- Name: referencealtident_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6302 | 6302 |
-- |
6303 | 6303 |
|
6304 |
ALTER TABLE ONLY plot
|
|
6305 |
ADD CONSTRAINT r2plot_parent_id FOREIGN KEY (parent_id) REFERENCES plot(plot_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6304 |
ALTER TABLE ONLY referencealtident
|
|
6305 |
ADD CONSTRAINT referencealtident_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6306 | 6306 |
|
6307 | 6307 |
|
6308 | 6308 |
-- |
6309 |
-- Name: r2plotevent_plot_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6309 |
-- Name: referencecontributor_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6310 | 6310 |
-- |
6311 | 6311 |
|
6312 |
ALTER TABLE ONLY plotevent
|
|
6313 |
ADD CONSTRAINT r2plotevent_plot_id FOREIGN KEY (plot_id) REFERENCES plot(plot_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6312 |
ALTER TABLE ONLY referencecontributor
|
|
6313 |
ADD CONSTRAINT referencecontributor_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6314 | 6314 |
|
6315 | 6315 |
|
6316 | 6316 |
-- |
6317 |
-- Name: r2ploteventcontributor_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6317 |
-- Name: referencecontributor_referenceparty_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6318 | 6318 |
-- |
6319 | 6319 |
|
6320 |
ALTER TABLE ONLY ploteventcontributor
|
|
6321 |
ADD CONSTRAINT r2ploteventcontributor_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6320 |
ALTER TABLE ONLY referencecontributor
|
|
6321 |
ADD CONSTRAINT referencecontributor_referenceparty_id FOREIGN KEY (referenceparty_id) REFERENCES referenceparty(referenceparty_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6322 | 6322 |
|
6323 | 6323 |
|
6324 | 6324 |
-- |
6325 |
-- Name: r2ploteventsynonym_primaryplotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6325 |
-- Name: referenceparty_currentparty_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6326 | 6326 |
-- |
6327 | 6327 |
|
6328 |
ALTER TABLE ONLY ploteventsynonym
|
|
6329 |
ADD CONSTRAINT r2ploteventsynonym_primaryplotevent_id FOREIGN KEY (primaryplotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6328 |
ALTER TABLE ONLY referenceparty
|
|
6329 |
ADD CONSTRAINT referenceparty_currentparty_id FOREIGN KEY (currentparty_id) REFERENCES referenceparty(referenceparty_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6330 | 6330 |
|
6331 | 6331 |
|
6332 | 6332 |
-- |
6333 |
-- Name: r2projectcontributor_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6333 |
-- Name: revision_previousrevision_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6334 | 6334 |
-- |
6335 | 6335 |
|
6336 |
ALTER TABLE ONLY projectcontributor
|
|
6337 |
ADD CONSTRAINT r2projectcontributor_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6336 |
ALTER TABLE ONLY revision
|
|
6337 |
ADD CONSTRAINT revision_previousrevision_id FOREIGN KEY (previousrevision_id) REFERENCES revision(revision_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6338 | 6338 |
|
6339 | 6339 |
|
6340 | 6340 |
-- |
6341 |
-- Name: r2referencecontributor_referenceparty_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6341 |
-- Name: soilobs_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6342 | 6342 |
-- |
6343 | 6343 |
|
6344 |
ALTER TABLE ONLY referencecontributor
|
|
6345 |
ADD CONSTRAINT r2referencecontributor_referenceparty_id FOREIGN KEY (referenceparty_id) REFERENCES referenceparty(referenceparty_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6344 |
ALTER TABLE ONLY soilobs
|
|
6345 |
ADD CONSTRAINT soilobs_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6346 | 6346 |
|
6347 | 6347 |
|
6348 | 6348 |
-- |
6349 |
-- Name: r2stratum_stratumtype_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6349 |
-- Name: soiltaxon_soilparent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6350 | 6350 |
-- |
6351 | 6351 |
|
6352 |
ALTER TABLE ONLY stratum
|
|
6353 |
ADD CONSTRAINT r2stratum_stratumtype_id FOREIGN KEY (stratumtype_id) REFERENCES stratumtype(stratumtype_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6352 |
ALTER TABLE ONLY soiltaxon
|
|
6353 |
ADD CONSTRAINT soiltaxon_soilparent_id FOREIGN KEY (soilparent_id) REFERENCES soiltaxon(soiltaxon_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6354 | 6354 |
|
6355 | 6355 |
|
6356 | 6356 |
-- |
6357 |
-- Name: r2taxonalt_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6357 |
-- Name: specimen_individualplant_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6358 | 6358 |
-- |
6359 | 6359 |
|
6360 |
ALTER TABLE ONLY taxonalt
|
|
6361 |
ADD CONSTRAINT r2taxonalt_plantconcept_id FOREIGN KEY (plantconcept_id) REFERENCES plantconcept(plantconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6360 |
ALTER TABLE ONLY specimen
|
|
6361 |
ADD CONSTRAINT specimen_individualplant_id_fkey FOREIGN KEY (individualplant_id) REFERENCES individualplant(individualplant_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6362 | 6362 |
|
6363 | 6363 |
|
6364 | 6364 |
-- |
6365 |
-- Name: r2taxondetermination_stemobservation_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6365 |
-- Name: specimen_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6366 | 6366 |
-- |
6367 | 6367 |
|
6368 |
ALTER TABLE ONLY taxondetermination
|
|
6369 |
ADD CONSTRAINT r2taxondetermination_stemobservation_id FOREIGN KEY (stemobservation_id) REFERENCES stemobservation(stemobservation_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6368 |
ALTER TABLE ONLY specimen
|
|
6369 |
ADD CONSTRAINT specimen_reference_id_fkey FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6370 | 6370 |
|
6371 | 6371 |
|
6372 | 6372 |
-- |
6373 |
-- Name: r2taxonoccurrence_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6373 |
-- Name: stemobservation_individualplant_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6374 | 6374 |
-- |
6375 | 6375 |
|
6376 |
ALTER TABLE ONLY taxonoccurrence
|
|
6377 |
ADD CONSTRAINT r2taxonoccurrence_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6376 |
ALTER TABLE ONLY stemobservation
|
|
6377 |
ADD CONSTRAINT stemobservation_individualplant_id FOREIGN KEY (individualplant_id) REFERENCES individualplant(individualplant_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6378 | 6378 |
|
6379 | 6379 |
|
6380 | 6380 |
-- |
6381 |
-- Name: r2userpermission_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6381 |
-- Name: stratum_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6382 | 6382 |
-- |
6383 | 6383 |
|
6384 |
ALTER TABLE ONLY userpermission
|
|
6385 |
ADD CONSTRAINT r2userpermission_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6384 |
ALTER TABLE ONLY stratum
|
|
6385 |
ADD CONSTRAINT stratum_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6386 | 6386 |
|
6387 | 6387 |
|
6388 | 6388 |
-- |
6389 |
-- Name: r3classcontributor_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6389 |
-- Name: stratum_stratummethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6390 | 6390 |
-- |
6391 | 6391 |
|
6392 |
ALTER TABLE ONLY classcontributor
|
|
6393 |
ADD CONSTRAINT r3classcontributor_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6392 |
ALTER TABLE ONLY stratum
|
|
6393 |
ADD CONSTRAINT stratum_stratummethod_id FOREIGN KEY (stratummethod_id) REFERENCES stratummethod(stratummethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6394 | 6394 |
|
6395 | 6395 |
|
6396 | 6396 |
-- |
6397 |
-- Name: r3commdetermination_commauthority_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6397 |
-- Name: stratum_stratumtype_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6398 | 6398 |
-- |
6399 | 6399 |
|
6400 |
ALTER TABLE ONLY commdetermination
|
|
6401 |
ADD CONSTRAINT r3commdetermination_commauthority_id FOREIGN KEY (commauthority_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6400 |
ALTER TABLE ONLY stratum
|
|
6401 |
ADD CONSTRAINT stratum_stratumtype_id FOREIGN KEY (stratumtype_id) REFERENCES stratumtype(stratumtype_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6402 | 6402 |
|
6403 | 6403 |
|
6404 | 6404 |
-- |
6405 |
-- Name: r3commstatus_commparent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6405 |
-- Name: stratummethod_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6406 | 6406 |
-- |
6407 | 6407 |
|
6408 |
ALTER TABLE ONLY commstatus
|
|
6409 |
ADD CONSTRAINT r3commstatus_commparent_id FOREIGN KEY (commparent_id) REFERENCES commconcept(commconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6408 |
ALTER TABLE ONLY stratummethod
|
|
6409 |
ADD CONSTRAINT stratummethod_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6410 | 6410 |
|
6411 | 6411 |
|
6412 | 6412 |
-- |
6413 |
-- Name: r3commusage_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6413 |
-- Name: stratumtype_stratummethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6414 | 6414 |
-- |
6415 | 6415 |
|
6416 |
ALTER TABLE ONLY commusage
|
|
6417 |
ADD CONSTRAINT r3commusage_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6416 |
ALTER TABLE ONLY stratumtype
|
|
6417 |
ADD CONSTRAINT stratumtype_stratummethod_id FOREIGN KEY (stratummethod_id) REFERENCES stratummethod(stratummethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6418 | 6418 |
|
6419 | 6419 |
|
6420 | 6420 |
-- |
6421 |
-- Name: r3note_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6421 |
-- Name: taxonalt_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6422 | 6422 |
-- |
6423 | 6423 |
|
6424 |
ALTER TABLE ONLY note
|
|
6425 |
ADD CONSTRAINT r3note_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6424 |
ALTER TABLE ONLY taxonalt
|
|
6425 |
ADD CONSTRAINT taxonalt_plantconcept_id FOREIGN KEY (plantconcept_id) REFERENCES plantconcept(plantconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6426 | 6426 |
|
6427 | 6427 |
|
6428 | 6428 |
-- |
6429 |
-- Name: r3partymember_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6429 |
-- Name: taxonalt_taxondetermination_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6430 | 6430 |
-- |
6431 | 6431 |
|
6432 |
ALTER TABLE ONLY partymember
|
|
6433 |
ADD CONSTRAINT r3partymember_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6432 |
ALTER TABLE ONLY taxonalt
|
|
6433 |
ADD CONSTRAINT taxonalt_taxondetermination_id FOREIGN KEY (taxondetermination_id) REFERENCES taxondetermination(taxondetermination_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6434 | 6434 |
|
6435 | 6435 |
|
6436 | 6436 |
-- |
6437 |
-- Name: r3plantstatus_plantparent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6437 |
-- Name: taxonbin_sizeclass_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6438 | 6438 |
-- |
6439 | 6439 |
|
6440 |
ALTER TABLE ONLY plantstatus
|
|
6441 |
ADD CONSTRAINT r3plantstatus_plantparent_id FOREIGN KEY (plantparent_id) REFERENCES plantconcept(plantconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6440 |
ALTER TABLE ONLY taxonbin
|
|
6441 |
ADD CONSTRAINT taxonbin_sizeclass_id FOREIGN KEY (sizeclass_id) REFERENCES sizeclass(sizeclass_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6442 | 6442 |
|
6443 | 6443 |
|
6444 | 6444 |
-- |
6445 |
-- Name: r3plantusage_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6445 |
-- Name: taxondetermination_collector_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6446 | 6446 |
-- |
6447 | 6447 |
|
6448 |
ALTER TABLE ONLY plantusage
|
|
6449 |
ADD CONSTRAINT r3plantusage_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6448 |
ALTER TABLE ONLY taxondetermination
|
|
6449 |
ADD CONSTRAINT taxondetermination_collector_id FOREIGN KEY (collector_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6450 | 6450 |
|
6451 | 6451 |
|
6452 | 6452 |
-- |
6453 |
-- Name: r3plotevent_project_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6453 |
-- Name: taxondetermination_museum_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6454 | 6454 |
-- |
6455 | 6455 |
|
6456 |
ALTER TABLE ONLY plotevent
|
|
6457 |
ADD CONSTRAINT r3plotevent_project_id FOREIGN KEY (project_id) REFERENCES project(project_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6456 |
ALTER TABLE ONLY taxondetermination
|
|
6457 |
ADD CONSTRAINT taxondetermination_museum_id FOREIGN KEY (museum_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6458 | 6458 |
|
6459 | 6459 |
|
6460 | 6460 |
-- |
6461 |
-- Name: r3ploteventcontributor_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6461 |
-- Name: taxondetermination_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6462 | 6462 |
-- |
6463 | 6463 |
|
6464 |
ALTER TABLE ONLY ploteventcontributor
|
|
6465 |
ADD CONSTRAINT r3ploteventcontributor_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6464 |
ALTER TABLE ONLY taxondetermination
|
|
6465 |
ADD CONSTRAINT taxondetermination_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6466 | 6466 |
|
6467 | 6467 |
|
6468 | 6468 |
-- |
6469 |
-- Name: r3ploteventsynonym_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6469 |
-- Name: taxondetermination_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6470 | 6470 |
-- |
6471 | 6471 |
|
6472 |
ALTER TABLE ONLY ploteventsynonym
|
|
6473 |
ADD CONSTRAINT r3ploteventsynonym_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6472 |
ALTER TABLE ONLY taxondetermination
|
|
6473 |
ADD CONSTRAINT taxondetermination_plantconcept_id FOREIGN KEY (plantconcept_id) REFERENCES plantconcept(plantconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6474 | 6474 |
|
6475 | 6475 |
|
6476 | 6476 |
-- |
6477 |
-- Name: r3projectcontributor_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6477 |
-- Name: taxondetermination_plantname_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6478 | 6478 |
-- |
6479 | 6479 |
|
6480 |
ALTER TABLE ONLY projectcontributor
|
|
6481 |
ADD CONSTRAINT r3projectcontributor_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6480 |
ALTER TABLE ONLY taxondetermination
|
|
6481 |
ADD CONSTRAINT taxondetermination_plantname_id FOREIGN KEY (plantname_id) REFERENCES plantname(plantname_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6482 | 6482 |
|
6483 | 6483 |
|
6484 | 6484 |
-- |
6485 |
-- Name: r3stratum_stratummethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6485 |
-- Name: taxondetermination_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6486 | 6486 |
-- |
6487 | 6487 |
|
6488 |
ALTER TABLE ONLY stratum
|
|
6489 |
ADD CONSTRAINT r3stratum_stratummethod_id FOREIGN KEY (stratummethod_id) REFERENCES stratummethod(stratummethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6488 |
ALTER TABLE ONLY taxondetermination
|
|
6489 |
ADD CONSTRAINT taxondetermination_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6490 | 6490 |
|
6491 | 6491 |
|
6492 | 6492 |
-- |
6493 |
-- Name: r3taxondetermination_plantconcept_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6493 |
-- Name: taxondetermination_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6494 | 6494 |
-- |
6495 | 6495 |
|
6496 | 6496 |
ALTER TABLE ONLY taxondetermination |
6497 |
ADD CONSTRAINT r3taxondetermination_plantconcept_id FOREIGN KEY (plantconcept_id) REFERENCES plantconcept(plantconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6497 |
ADD CONSTRAINT taxondetermination_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6498 | 6498 |
|
6499 | 6499 |
|
6500 | 6500 |
-- |
6501 |
-- Name: r4commstatus_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6501 |
-- Name: taxondetermination_specimen_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6502 | 6502 |
-- |
6503 | 6503 |
|
6504 |
ALTER TABLE ONLY commstatus
|
|
6505 |
ADD CONSTRAINT r4commstatus_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6504 |
ALTER TABLE ONLY taxondetermination
|
|
6505 |
ADD CONSTRAINT taxondetermination_specimen_id FOREIGN KEY (specimen_id) REFERENCES specimen(specimen_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6506 | 6506 |
|
6507 | 6507 |
|
6508 | 6508 |
-- |
6509 |
-- Name: r4commusage_commstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6509 |
-- Name: taxondetermination_stemobservation_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6510 | 6510 |
-- |
6511 | 6511 |
|
6512 |
ALTER TABLE ONLY commusage
|
|
6513 |
ADD CONSTRAINT r4commusage_commstatus_id FOREIGN KEY (commstatus_id) REFERENCES commstatus(commstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6512 |
ALTER TABLE ONLY taxondetermination
|
|
6513 |
ADD CONSTRAINT taxondetermination_stemobservation_id FOREIGN KEY (stemobservation_id) REFERENCES stemobservation(stemobservation_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6514 | 6514 |
|
6515 | 6515 |
|
6516 | 6516 |
-- |
6517 |
-- Name: r4plantstatus_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6517 |
-- Name: taxondetermination_taxonoccurrence_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6518 | 6518 |
-- |
6519 | 6519 |
|
6520 |
ALTER TABLE ONLY plantstatus
|
|
6521 |
ADD CONSTRAINT r4plantstatus_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6520 |
ALTER TABLE ONLY taxondetermination
|
|
6521 |
ADD CONSTRAINT taxondetermination_taxonoccurrence_id FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6522 | 6522 |
|
6523 | 6523 |
|
6524 | 6524 |
-- |
6525 |
-- Name: r4plantusage_plantstatus_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6525 |
-- Name: taxonoccurrence_plotevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6526 | 6526 |
-- |
6527 | 6527 |
|
6528 |
ALTER TABLE ONLY plantusage
|
|
6529 |
ADD CONSTRAINT r4plantusage_plantstatus_id FOREIGN KEY (plantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6528 |
ALTER TABLE ONLY taxonoccurrence
|
|
6529 |
ADD CONSTRAINT taxonoccurrence_plotevent_id FOREIGN KEY (plotevent_id) REFERENCES plotevent(plotevent_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6530 | 6530 |
|
6531 | 6531 |
|
6532 | 6532 |
-- |
6533 |
-- Name: r4plotevent_covermethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6533 |
-- Name: taxonoccurrence_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6534 | 6534 |
-- |
6535 | 6535 |
|
6536 |
ALTER TABLE ONLY plotevent
|
|
6537 |
ADD CONSTRAINT r4plotevent_covermethod_id FOREIGN KEY (covermethod_id) REFERENCES covermethod(covermethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6536 |
ALTER TABLE ONLY taxonoccurrence
|
|
6537 |
ADD CONSTRAINT taxonoccurrence_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6538 | 6538 |
|
6539 | 6539 |
|
6540 | 6540 |
-- |
6541 |
-- Name: r4ploteventsynonym_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6541 |
-- Name: telephone_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6542 | 6542 |
-- |
6543 | 6543 |
|
6544 |
ALTER TABLE ONLY ploteventsynonym
|
|
6545 |
ADD CONSTRAINT r4ploteventsynonym_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6544 |
ALTER TABLE ONLY telephone
|
|
6545 |
ADD CONSTRAINT telephone_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6546 | 6546 |
|
6547 | 6547 |
|
6548 | 6548 |
-- |
6549 |
-- Name: r4taxondetermination_plantname_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6549 |
-- Name: trait_stemobservation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6550 | 6550 |
-- |
6551 | 6551 |
|
6552 |
ALTER TABLE ONLY taxondetermination
|
|
6553 |
ADD CONSTRAINT r4taxondetermination_plantname_id FOREIGN KEY (plantname_id) REFERENCES plantname(plantname_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6552 |
ALTER TABLE ONLY trait
|
|
6553 |
ADD CONSTRAINT trait_stemobservation_id_fkey FOREIGN KEY (stemobservation_id) REFERENCES stemobservation(stemobservation_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6554 | 6554 |
|
6555 | 6555 |
|
6556 | 6556 |
-- |
6557 |
-- Name: r5plotevent_stratummethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6557 |
-- Name: usercertification_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6558 | 6558 |
-- |
6559 | 6559 |
|
6560 |
ALTER TABLE ONLY plotevent
|
|
6561 |
ADD CONSTRAINT r5plotevent_stratummethod_id FOREIGN KEY (stratummethod_id) REFERENCES stratummethod(stratummethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6560 |
ALTER TABLE ONLY usercertification
|
|
6561 |
ADD CONSTRAINT usercertification_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6562 | 6562 |
|
6563 | 6563 |
|
6564 | 6564 |
-- |
6565 |
-- Name: r5taxondetermination_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6565 |
-- Name: userdataset_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6566 | 6566 |
-- |
6567 | 6567 |
|
6568 |
ALTER TABLE ONLY taxondetermination
|
|
6569 |
ADD CONSTRAINT r5taxondetermination_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6568 |
ALTER TABLE ONLY userdataset
|
|
6569 |
ADD CONSTRAINT userdataset_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6570 | 6570 |
|
6571 | 6571 |
|
6572 | 6572 |
-- |
6573 |
-- Name: r6plotevent_soiltaxon_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6573 |
-- Name: userdatasetitem_userdataset_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6574 | 6574 |
-- |
6575 | 6575 |
|
6576 |
ALTER TABLE ONLY plotevent
|
|
6577 |
ADD CONSTRAINT r6plotevent_soiltaxon_id FOREIGN KEY (soiltaxon_id) REFERENCES soiltaxon(soiltaxon_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6576 |
ALTER TABLE ONLY userdatasetitem
|
|
6577 |
ADD CONSTRAINT userdatasetitem_userdataset_id FOREIGN KEY (userdataset_id) REFERENCES userdataset(userdataset_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6578 | 6578 |
|
6579 | 6579 |
|
6580 | 6580 |
-- |
6581 |
-- Name: r6taxondetermination_role_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6581 |
-- Name: usernotify_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6582 | 6582 |
-- |
6583 | 6583 |
|
6584 |
ALTER TABLE ONLY taxondetermination
|
|
6585 |
ADD CONSTRAINT r6taxondetermination_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6584 |
ALTER TABLE ONLY usernotify
|
|
6585 |
ADD CONSTRAINT usernotify_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6586 | 6586 |
|
6587 | 6587 |
|
6588 | 6588 |
-- |
6589 |
-- Name: r7taxondetermination_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6589 |
-- Name: userpermission_embargo_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6590 | 6590 |
-- |
6591 | 6591 |
|
6592 |
ALTER TABLE ONLY taxondetermination
|
|
6593 |
ADD CONSTRAINT r7taxondetermination_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6592 |
ALTER TABLE ONLY userpermission
|
|
6593 |
ADD CONSTRAINT userpermission_embargo_id FOREIGN KEY (embargo_id) REFERENCES embargo(embargo_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6594 | 6594 |
|
6595 | 6595 |
|
6596 | 6596 |
-- |
6597 |
-- Name: r8taxondetermination_collector_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6597 |
-- Name: userpermission_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6598 | 6598 |
-- |
6599 | 6599 |
|
6600 |
ALTER TABLE ONLY taxondetermination
|
|
6601 |
ADD CONSTRAINT r8taxondetermination_collector_id FOREIGN KEY (collector_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6600 |
ALTER TABLE ONLY userpermission
|
|
6601 |
ADD CONSTRAINT userpermission_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6602 | 6602 |
|
6603 | 6603 |
|
6604 | 6604 |
-- |
6605 |
-- Name: r9taxondetermination_museum_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6605 |
-- Name: userpreference_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6606 | 6606 |
-- |
6607 | 6607 |
|
6608 |
ALTER TABLE ONLY taxondetermination
|
|
6609 |
ADD CONSTRAINT r9taxondetermination_museum_id FOREIGN KEY (museum_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6608 |
ALTER TABLE ONLY userpreference
|
|
6609 |
ADD CONSTRAINT userpreference_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6610 | 6610 |
|
6611 | 6611 |
|
6612 | 6612 |
-- |
6613 |
-- Name: specimen_individualplant_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6613 |
-- Name: userquery_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6614 | 6614 |
-- |
6615 | 6615 |
|
6616 |
ALTER TABLE ONLY specimen
|
|
6617 |
ADD CONSTRAINT specimen_individualplant_id_fkey FOREIGN KEY (individualplant_id) REFERENCES individualplant(individualplant_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6616 |
ALTER TABLE ONLY userquery
|
|
6617 |
ADD CONSTRAINT userquery_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6618 | 6618 |
|
6619 | 6619 |
|
6620 | 6620 |
-- |
6621 |
-- Name: specimen_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6621 |
-- Name: userrecordowner_usr_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6622 | 6622 |
-- |
6623 | 6623 |
|
6624 |
ALTER TABLE ONLY specimen
|
|
6625 |
ADD CONSTRAINT specimen_reference_id_fkey FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6624 |
ALTER TABLE ONLY userrecordowner
|
|
6625 |
ADD CONSTRAINT userrecordowner_usr_id FOREIGN KEY (usr_id) REFERENCES usr(usr_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6626 | 6626 |
|
6627 | 6627 |
|
6628 | 6628 |
-- |
6629 |
-- Name: taxonbin_sizeclass_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6629 |
-- Name: userregionalexp_usercertification_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6630 | 6630 |
-- |
6631 | 6631 |
|
6632 |
ALTER TABLE ONLY taxonbin
|
|
6633 |
ADD CONSTRAINT taxonbin_sizeclass_id FOREIGN KEY (sizeclass_id) REFERENCES sizeclass(sizeclass_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6632 |
ALTER TABLE ONLY userregionalexp
|
|
6633 |
ADD CONSTRAINT userregionalexp_usercertification_id FOREIGN KEY (usercertification_id) REFERENCES usercertification(usercertification_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6634 | 6634 |
|
6635 | 6635 |
|
6636 | 6636 |
-- |
6637 |
-- Name: trait_stemobservation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6637 |
-- Name: usr_party_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6638 | 6638 |
-- |
6639 | 6639 |
|
6640 |
ALTER TABLE ONLY trait
|
|
6641 |
ADD CONSTRAINT trait_stemobservation_id_fkey FOREIGN KEY (stemobservation_id) REFERENCES stemobservation(stemobservation_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6640 |
ALTER TABLE ONLY usr
|
|
6641 |
ADD CONSTRAINT usr_party_id FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6642 | 6642 |
|
6643 | 6643 |
|
6644 | 6644 |
-- |
Also available in: Unified diff
vegbien.sql: Removed r# prefix from foreign key constraints