Revision 4932
Added by Aaron Marcuse-Kubitza about 12 years ago
vegbien.my.sql | ||
---|---|---|
2324 | 2324 |
|
2325 | 2325 |
|
2326 | 2326 |
-- |
2327 |
-- Name: stemtag; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
2328 |
-- |
|
2329 |
|
|
2330 |
CREATE TABLE stemtag ( |
|
2331 |
stemtag_id int(11) NOT NULL, |
|
2332 |
stemobservation_id int(11) NOT NULL, |
|
2333 |
tag text NOT NULL, |
|
2334 |
iscurrent int(1) DEFAULT true NOT NULL |
|
2335 |
); |
|
2336 |
|
|
2337 |
|
|
2338 |
-- |
|
2339 |
-- Name: stemtag_stemtag_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
2340 |
-- |
|
2341 |
|
|
2342 |
|
|
2343 |
|
|
2344 |
|
|
2345 |
-- |
|
2346 |
-- Name: stemtag_stemtag_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
2347 |
-- |
|
2348 |
|
|
2349 |
|
|
2350 |
|
|
2351 |
|
|
2352 |
-- |
|
2353 | 2327 |
-- Name: stratum; Type: TABLE; Schema: public; Owner: -; Tablespace: |
2354 | 2328 |
-- |
2355 | 2329 |
|
... | ... | |
3009 | 2983 |
|
3010 | 2984 |
|
3011 | 2985 |
-- |
3012 |
-- Name: stemtag_id; Type: DEFAULT; Schema: public; Owner: - |
|
3013 |
-- |
|
3014 |
|
|
3015 |
|
|
3016 |
|
|
3017 |
|
|
3018 |
-- |
|
3019 | 2986 |
-- Name: stratum_id; Type: DEFAULT; Schema: public; Owner: - |
3020 | 2987 |
-- |
3021 | 2988 |
|
... | ... | |
3581 | 3548 |
|
3582 | 3549 |
|
3583 | 3550 |
-- |
3584 |
-- Name: stemtag_current_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3585 |
-- |
|
3586 |
|
|
3587 |
ALTER TABLE stemtag |
|
3588 |
ADD CONSTRAINT stemtag_current_unique UNIQUE (stemobservation_id, iscurrent); |
|
3589 |
|
|
3590 |
|
|
3591 |
-- |
|
3592 |
-- Name: stemtag_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3593 |
-- |
|
3594 |
|
|
3595 |
ALTER TABLE stemtag |
|
3596 |
ADD CONSTRAINT stemtag_pkey PRIMARY KEY (stemtag_id); |
|
3597 |
|
|
3598 |
|
|
3599 |
-- |
|
3600 |
-- Name: stemtag_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3601 |
-- |
|
3602 |
|
|
3603 |
ALTER TABLE stemtag |
|
3604 |
ADD CONSTRAINT stemtag_unique UNIQUE (stemobservation_id, tag); |
|
3605 |
|
|
3606 |
|
|
3607 |
-- |
|
3608 | 3551 |
-- Name: stratum_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
3609 | 3552 |
-- |
3610 | 3553 |
|
... | ... | |
4946 | 4889 |
|
4947 | 4890 |
|
4948 | 4891 |
-- |
4949 |
-- Name: stemtag_stemobservation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
4950 |
-- |
|
4951 |
|
|
4952 |
ALTER TABLE stemtag |
|
4953 |
ADD CONSTRAINT stemtag_stemobservation_id_fkey FOREIGN KEY (stemobservation_id) REFERENCES stemobservation(stemobservation_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
4954 |
|
|
4955 |
|
|
4956 |
-- |
|
4957 | 4892 |
-- Name: stratum_locationevent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
4958 | 4893 |
-- |
4959 | 4894 |
|
Also available in: Unified diff
schemas/vegbien.sql: Removed no longer used table stemtag, which has been replaced by stemobservation.tag, stemobservation.tags