Revision 6875
Added by Aaron Marcuse-Kubitza almost 12 years ago
vegbien.sql | ||
---|---|---|
4471 | 4471 |
|
4472 | 4472 |
CREATE TABLE trait ( |
4473 | 4473 |
trait_id integer NOT NULL, |
4474 |
stemobservation_id integer NOT NULL,
|
|
4474 |
taxonlabel_id integer NOT NULL,
|
|
4475 | 4475 |
type text NOT NULL, |
4476 | 4476 |
value text |
4477 | 4477 |
); |
... | ... | |
7697 | 7697 |
|
7698 | 7698 |
|
7699 | 7699 |
-- |
7700 |
-- Name: trait_stemobservation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
7700 |
-- Name: trait_taxonlabel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
7701 | 7701 |
-- |
7702 | 7702 |
|
7703 | 7703 |
ALTER TABLE ONLY trait |
7704 |
ADD CONSTRAINT trait_stemobservation_id_fkey FOREIGN KEY (stemobservation_id) REFERENCES stemobservation(stemobservation_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
7704 |
ADD CONSTRAINT trait_taxonlabel_id_fkey FOREIGN KEY (taxonlabel_id) REFERENCES taxonlabel(taxonlabel_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
7705 | 7705 |
|
7706 | 7706 |
|
7707 | 7707 |
-- |
Also available in: Unified diff
schemas/vegbien.sql: trait: Linked to taxonlabel instead of stemobservation, because TraitObservation's traits are taxon-level and stem-level traits currently go in named fields instead of a stem traits table