Revision 658
Added by Aaron Marcuse-Kubitza about 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), |
|
228 | 227 |
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, |
|
232 | 228 |
CONSTRAINT aggregateoccurrence_taxonbinmethod_id FOREIGN KEY (taxonbinmethod_id) |
233 | 229 |
REFERENCES taxonbinmethod (taxonbinmethod_id) MATCH SIMPLE |
234 | 230 |
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, |
|
62 | 61 |
); |
63 | 62 |
|
64 | 63 |
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, |
|
228 | 227 |
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, |
|
232 | 228 |
CONSTRAINT aggregateoccurrence_taxonbinmethod_id FOREIGN KEY (taxonbinmethod_id) |
233 | 229 |
REFERENCES taxonbinmethod (taxonbinmethod_id) MATCH SIMPLE |
234 | 230 |
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), |
|
93 |
individualplant_id integer |
|
92 |
sourceaccessioncode character varying(100) |
|
94 | 93 |
); |
95 | 94 |
|
96 | 95 |
|
... | ... | |
5029 | 5028 |
|
5030 | 5029 |
|
5031 | 5030 |
-- |
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 |
-- |
|
5039 | 5031 |
-- Name: fki_location_namedplace_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
5040 | 5032 |
-- |
5041 | 5033 |
|
... | ... | |
5878 | 5870 |
|
5879 | 5871 |
|
5880 | 5872 |
-- |
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 |
-- |
|
5889 | 5873 |
-- Name: aggregateoccurrence_taxonbinmethod_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
5890 | 5874 |
-- |
5891 | 5875 |
|
Also available in: Unified diff
Undoing previous commit since it would prevent a plant from being tied to a data source, because the aggregateoccurrence pointer goes in the wrong direction