Project

General

Profile

« Previous | Next » 

Revision 4932

schemas/vegbien.sql: Removed no longer used table stemtag, which has been replaced by stemobservation.tag, stemobservation.tags

View differences:

schemas/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

  
schemas/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