Revision 6882
Added by Aaron Marcuse-Kubitza about 12 years ago
vegbien.my.sql | ||
---|---|---|
3374 | 3374 |
|
3375 | 3375 |
CREATE TABLE trait ( |
3376 | 3376 |
trait_id int(11) NOT NULL, |
3377 |
taxonlabel_id int(11) NOT NULL,
|
|
3377 |
taxonoccurrence_id int(11) NOT NULL,
|
|
3378 | 3378 |
name varchar(255) NOT NULL, |
3379 | 3379 |
value varchar(255), |
3380 | 3380 |
units varchar(255) |
... | ... | |
6545 | 6545 |
|
6546 | 6546 |
|
6547 | 6547 |
-- |
6548 |
-- Name: trait_taxonlabel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6548 |
-- Name: trait_taxonoccurrence_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6549 | 6549 |
-- |
6550 | 6550 |
|
6551 | 6551 |
ALTER TABLE trait |
6552 |
ADD CONSTRAINT trait_taxonlabel_id_fkey FOREIGN KEY (taxonlabel_id) REFERENCES taxonlabel(taxonlabel_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6552 |
ADD CONSTRAINT trait_taxonoccurrence_id_fkey FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6553 | 6553 |
|
6554 | 6554 |
|
6555 | 6555 |
-- |
Also available in: Unified diff
schemas/vegbien.sql: Reattached trait to taxonoccurrence instead of taxonlabel, because the TraitObservation traits data is actually associated with a particular occurrence (plant observation complete with location, date, etc.), rather than just a taxon