Revision 657
Added by Aaron Marcuse-Kubitza almost 13 years ago
schemas/vegbien.for_ERD.my.sql | ||
---|---|---|
224 | 224 |
count int(11), |
225 | 225 |
accessioncode character varying(255), |
226 | 226 |
sourceaccessioncode character varying(100), |
227 |
individualplant_id int(11), |
|
227 | 228 |
CONSTRAINT aggregateoccurrence_pkey PRIMARY KEY (aggregateoccurrence_id ), |
229 |
CONSTRAINT aggregateoccurrence_individualplant_id FOREIGN KEY (individualplant_id) |
|
230 |
REFERENCES individualplant (individualplant_id) MATCH SIMPLE |
|
231 |
ON UPDATE CASCADE ON DELETE CASCADE, |
|
228 | 232 |
CONSTRAINT aggregateoccurrence_taxonbinmethod_id FOREIGN KEY (taxonbinmethod_id) |
229 | 233 |
REFERENCES taxonbinmethod (taxonbinmethod_id) MATCH SIMPLE |
230 | 234 |
ON UPDATE CASCADE ON DELETE CASCADE, |
schemas/vegbien.for_wiki.sql | ||
---|---|---|
58 | 58 |
count integer, |
59 | 59 |
accessioncode character varying(255), |
60 | 60 |
sourceaccessioncode character varying(100), |
61 |
individualplant_id integer, |
|
61 | 62 |
); |
62 | 63 |
|
63 | 64 |
CREATE TABLE individualplant -- VegBank's stemcount table. |
schemas/vegbien.for_ERD.sql | ||
---|---|---|
224 | 224 |
count integer, |
225 | 225 |
accessioncode character varying(255), |
226 | 226 |
sourceaccessioncode character varying(100), |
227 |
individualplant_id integer, |
|
227 | 228 |
CONSTRAINT aggregateoccurrence_pkey PRIMARY KEY (aggregateoccurrence_id ), |
229 |
CONSTRAINT aggregateoccurrence_individualplant_id FOREIGN KEY (individualplant_id) |
|
230 |
REFERENCES individualplant (individualplant_id) MATCH SIMPLE |
|
231 |
ON UPDATE CASCADE ON DELETE CASCADE, |
|
228 | 232 |
CONSTRAINT aggregateoccurrence_taxonbinmethod_id FOREIGN KEY (taxonbinmethod_id) |
229 | 233 |
REFERENCES taxonbinmethod (taxonbinmethod_id) MATCH SIMPLE |
230 | 234 |
ON UPDATE CASCADE ON DELETE CASCADE, |
schemas/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
vegbien.sql: Added aggregateoccurrence.individualplant_id to make a 1:1 relationship between aggregateoccurrence and individualplant