Revision 4932
Added by Aaron Marcuse-Kubitza about 12 years ago
vegbien.sql | ||
---|---|---|
2851 | 2851 |
|
2852 | 2852 |
|
2853 | 2853 |
-- |
2854 |
-- Name: stemtag; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
2855 |
-- |
|
2856 |
|
|
2857 |
CREATE TABLE stemtag ( |
|
2858 |
stemtag_id integer NOT NULL, |
|
2859 |
stemobservation_id integer NOT NULL, |
|
2860 |
tag text NOT NULL, |
|
2861 |
iscurrent boolean DEFAULT true NOT NULL |
|
2862 |
); |
|
2863 |
|
|
2864 |
|
|
2865 |
-- |
|
2866 |
-- Name: stemtag_stemtag_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
2867 |
-- |
|
2868 |
|
|
2869 |
CREATE SEQUENCE stemtag_stemtag_id_seq |
|
2870 |
START WITH 1 |
|
2871 |
INCREMENT BY 1 |
|
2872 |
NO MINVALUE |
|
2873 |
NO MAXVALUE |
|
2874 |
CACHE 1; |
|
2875 |
|
|
2876 |
|
|
2877 |
-- |
|
2878 |
-- Name: stemtag_stemtag_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
2879 |
-- |
|
2880 |
|
|
2881 |
ALTER SEQUENCE stemtag_stemtag_id_seq OWNED BY stemtag.stemtag_id; |
|
2882 |
|
|
2883 |
|
|
2884 |
-- |
|
2885 | 2854 |
-- Name: stratum; Type: TABLE; Schema: public; Owner: -; Tablespace: |
2886 | 2855 |
-- |
2887 | 2856 |
|
... | ... | |
3597 | 3566 |
|
3598 | 3567 |
|
3599 | 3568 |
-- |
3600 |
-- Name: stemtag_id; Type: DEFAULT; Schema: public; Owner: - |
|
3601 |
-- |
|
3602 |
|
|
3603 |
ALTER TABLE stemtag ALTER COLUMN stemtag_id SET DEFAULT nextval('stemtag_stemtag_id_seq'::regclass); |
|
3604 |
|
|
3605 |
|
|
3606 |
-- |
|
3607 | 3569 |
-- Name: stratum_id; Type: DEFAULT; Schema: public; Owner: - |
3608 | 3570 |
-- |
3609 | 3571 |
|
... | ... | |
4169 | 4131 |
|
4170 | 4132 |
|
4171 | 4133 |
-- |
4172 |
-- Name: stemtag_current_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4173 |
-- |
|
4174 |
|
|
4175 |
ALTER TABLE ONLY stemtag |
|
4176 |
ADD CONSTRAINT stemtag_current_unique UNIQUE (stemobservation_id, iscurrent); |
|
4177 |
|
|
4178 |
|
|
4179 |
-- |
|
4180 |
-- Name: stemtag_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4181 |
-- |
|
4182 |
|
|
4183 |
ALTER TABLE ONLY stemtag |
|
4184 |
ADD CONSTRAINT stemtag_pkey PRIMARY KEY (stemtag_id); |
|
4185 |
|
|
4186 |
|
|
4187 |
-- |
|
4188 |
-- Name: stemtag_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4189 |
-- |
|
4190 |
|
|
4191 |
ALTER TABLE ONLY stemtag |
|
4192 |
ADD CONSTRAINT stemtag_unique UNIQUE (stemobservation_id, tag); |
|
4193 |
|
|
4194 |
|
|
4195 |
-- |
|
4196 | 4134 |
-- Name: stratum_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
4197 | 4135 |
-- |
4198 | 4136 |
|
... | ... | |
5569 | 5507 |
|
5570 | 5508 |
|
5571 | 5509 |
-- |
5572 |
-- Name: stemtag_stemobservation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
5573 |
-- |
|
5574 |
|
|
5575 |
ALTER TABLE ONLY stemtag |
|
5576 |
ADD CONSTRAINT stemtag_stemobservation_id_fkey FOREIGN KEY (stemobservation_id) REFERENCES stemobservation(stemobservation_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
5577 |
|
|
5578 |
|
|
5579 |
-- |
|
5580 | 5510 |
-- Name: stratum_locationevent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
5581 | 5511 |
-- |
5582 | 5512 |
|
Also available in: Unified diff
schemas/vegbien.sql: Removed no longer used table stemtag, which has been replaced by stemobservation.tag, stemobservation.tags