Project

General

Profile

« Previous | Next » 

Revision 657

vegbien.sql: Added aggregateoccurrence.individualplant_id to make a 1:1 relationship between aggregateoccurrence and individualplant

View differences:

vegbien.sql
89 89
    covercode character varying(10),
90 90
    count integer,
91 91
    accessioncode character varying(255),
92
    sourceaccessioncode character varying(100)
92
    sourceaccessioncode character varying(100),
93
    individualplant_id integer
93 94
);
94 95

  
95 96

  
......
5028 5029

  
5029 5030

  
5030 5031
--
5032
-- Name: fki_aggregateoccurrence_individualplant_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5033
--
5034

  
5035
CREATE INDEX fki_aggregateoccurrence_individualplant_id ON aggregateoccurrence USING btree (individualplant_id);
5036

  
5037

  
5038
--
5031 5039
-- Name: fki_location_namedplace_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5032 5040
--
5033 5041

  
......
5870 5878

  
5871 5879

  
5872 5880
--
5881
-- Name: aggregateoccurrence_individualplant_id; Type: FK CONSTRAINT; Schema: public; Owner: -
5882
--
5883

  
5884
ALTER TABLE ONLY aggregateoccurrence
5885
    ADD CONSTRAINT aggregateoccurrence_individualplant_id FOREIGN KEY (individualplant_id) REFERENCES individualplant(individualplant_id) ON UPDATE CASCADE ON DELETE CASCADE;
5886

  
5887

  
5888
--
5873 5889
-- Name: aggregateoccurrence_taxonbinmethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
5874 5890
--
5875 5891

  

Also available in: Unified diff