Revision 427
Added by Aaron Marcuse-Kubitza about 13 years ago
schemas/vegbien_empty.sql | ||
---|---|---|
70 | 70 |
TRUNCATE telephone CASCADE; |
71 | 71 |
TRUNCATE temptbl_std_commnames CASCADE; |
72 | 72 |
TRUNCATE temptbl_std_plantnames CASCADE; |
73 |
TRUNCATE trait CASCADE; |
|
73 | 74 |
TRUNCATE usercertification CASCADE; |
74 | 75 |
TRUNCATE userdataset CASCADE; |
75 | 76 |
TRUNCATE userdatasetitem CASCADE; |
schemas/vegbien.sql | ||
---|---|---|
2597 | 2597 |
ALTER SEQUENCE temptbl_std_plantnames_plantconcept_id_seq OWNED BY temptbl_std_plantnames.plantconcept_id; |
2598 | 2598 |
|
2599 | 2599 |
|
2600 |
SET default_with_oids = false; |
|
2601 |
|
|
2600 | 2602 |
-- |
2603 |
-- Name: trait; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
2604 |
-- |
|
2605 |
|
|
2606 |
CREATE TABLE trait ( |
|
2607 |
trait_id integer NOT NULL, |
|
2608 |
stemobservation_id integer NOT NULL, |
|
2609 |
type character varying NOT NULL, |
|
2610 |
value character varying |
|
2611 |
); |
|
2612 |
|
|
2613 |
|
|
2614 |
-- |
|
2615 |
-- Name: trait_trait_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
2616 |
-- |
|
2617 |
|
|
2618 |
CREATE SEQUENCE trait_trait_id_seq |
|
2619 |
START WITH 1 |
|
2620 |
INCREMENT BY 1 |
|
2621 |
NO MINVALUE |
|
2622 |
NO MAXVALUE |
|
2623 |
CACHE 1; |
|
2624 |
|
|
2625 |
|
|
2626 |
-- |
|
2627 |
-- Name: trait_trait_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
2628 |
-- |
|
2629 |
|
|
2630 |
ALTER SEQUENCE trait_trait_id_seq OWNED BY trait.trait_id; |
|
2631 |
|
|
2632 |
|
|
2633 |
SET default_with_oids = true; |
|
2634 |
|
|
2635 |
-- |
|
2601 | 2636 |
-- Name: usercertification; Type: TABLE; Schema: public; Owner: -; Tablespace: |
2602 | 2637 |
-- |
2603 | 2638 |
|
... | ... | |
3487 | 3522 |
|
3488 | 3523 |
|
3489 | 3524 |
-- |
3525 |
-- Name: trait_id; Type: DEFAULT; Schema: public; Owner: - |
|
3526 |
-- |
|
3527 |
|
|
3528 |
ALTER TABLE trait ALTER COLUMN trait_id SET DEFAULT nextval('trait_trait_id_seq'::regclass); |
|
3529 |
|
|
3530 |
|
|
3531 |
-- |
|
3490 | 3532 |
-- Name: usercertification_id; Type: DEFAULT; Schema: public; Owner: - |
3491 | 3533 |
-- |
3492 | 3534 |
|
... | ... | |
4116 | 4158 |
|
4117 | 4159 |
|
4118 | 4160 |
-- |
4161 |
-- Name: trait_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4162 |
-- |
|
4163 |
|
|
4164 |
ALTER TABLE ONLY trait |
|
4165 |
ADD CONSTRAINT trait_pkey PRIMARY KEY (trait_id); |
|
4166 |
|
|
4167 |
|
|
4168 |
-- |
|
4119 | 4169 |
-- Name: usercertification_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
4120 | 4170 |
-- |
4121 | 4171 |
|
... | ... | |
6377 | 6427 |
|
6378 | 6428 |
|
6379 | 6429 |
-- |
6430 |
-- Name: trait_stemobservation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6431 |
-- |
|
6432 |
|
|
6433 |
ALTER TABLE ONLY trait |
|
6434 |
ADD CONSTRAINT trait_stemobservation_id_fkey FOREIGN KEY (stemobservation_id) REFERENCES stemobservation(stemobservation_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6435 |
|
|
6436 |
|
|
6437 |
-- |
|
6380 | 6438 |
-- PostgreSQL database dump complete |
6381 | 6439 |
-- |
6382 | 6440 |
|
Also available in: Unified diff
vegbien.sql: Added trait table