Project

General

Profile

« Previous | Next » 

Revision 489

VegBIEN: Renamed stemobservation to stem

View differences:

vegbien.sql
1655 1655
    methodnarrative text,
1656 1656
    taxonoccurrencearea double precision,
1657 1657
    stemsizelimit double precision,
1658
    stemobservationarea double precision,
1658
    stemarea double precision,
1659 1659
    stemsamplemethod character varying(30),
1660 1660
    originaldata text,
1661 1661
    effortlevel character varying(30),
......
2287 2287
SET default_with_oids = true;
2288 2288

  
2289 2289
--
2290
-- Name: stemobservation; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2290
-- Name: stem; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2291 2291
--
2292 2292

  
2293
CREATE TABLE stemobservation (
2294
    stemobservation_id integer NOT NULL,
2293
CREATE TABLE stem (
2294
    stem_id integer NOT NULL,
2295 2295
    individualplant_id integer NOT NULL,
2296 2296
    authorcode character varying(20),
2297 2297
    stemxposition double precision,
2298 2298
    stemyposition double precision,
2299 2299
    stemhealth character varying(50),
2300
    emb_stemobservation integer,
2300
    emb_stem integer,
2301 2301
    stemdiameter double precision,
2302 2302
    stemheight double precision,
2303 2303
    stemheightaccuracy double precision,
......
2306 2306

  
2307 2307

  
2308 2308
--
2309
-- Name: TABLE stemobservation; Type: COMMENT; Schema: public; Owner: -
2309
-- Name: TABLE stem; Type: COMMENT; Schema: public; Owner: -
2310 2310
--
2311 2311

  
2312
COMMENT ON TABLE stemobservation IS 'VegBank''s stemlocation table.';
2312
COMMENT ON TABLE stem IS 'VegBank''s stemlocation table.';
2313 2313

  
2314 2314

  
2315 2315
--
2316
-- Name: stemobservation_stemobservation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2316
-- Name: stem_stem_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2317 2317
--
2318 2318

  
2319
CREATE SEQUENCE stemobservation_stemobservation_id_seq
2319
CREATE SEQUENCE stem_stem_id_seq
2320 2320
    START WITH 1
2321 2321
    INCREMENT BY 1
2322 2322
    NO MINVALUE
......
2325 2325

  
2326 2326

  
2327 2327
--
2328
-- Name: stemobservation_stemobservation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2328
-- Name: stem_stem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2329 2329
--
2330 2330

  
2331
ALTER SEQUENCE stemobservation_stemobservation_id_seq OWNED BY stemobservation.stemobservation_id;
2331
ALTER SEQUENCE stem_stem_id_seq OWNED BY stem.stem_id;
2332 2332

  
2333 2333

  
2334 2334
--
......
2493 2493
CREATE TABLE taxondetermination (
2494 2494
    taxondetermination_id integer NOT NULL,
2495 2495
    taxonoccurrence_id integer NOT NULL,
2496
    stemobservation_id integer,
2496
    stem_id integer,
2497 2497
    plantconcept_id integer,
2498 2498
    plantname_id integer NOT NULL,
2499 2499
    party_id integer NOT NULL,
......
2702 2702

  
2703 2703
CREATE TABLE trait (
2704 2704
    trait_id integer NOT NULL,
2705
    stemobservation_id integer NOT NULL,
2705
    stem_id integer NOT NULL,
2706 2706
    type character varying(255) NOT NULL,
2707 2707
    value character varying(255)
2708 2708
);
......
3556 3556

  
3557 3557

  
3558 3558
--
3559
-- Name: stemobservation_id; Type: DEFAULT; Schema: public; Owner: -
3559
-- Name: stem_id; Type: DEFAULT; Schema: public; Owner: -
3560 3560
--
3561 3561

  
3562
ALTER TABLE stemobservation ALTER COLUMN stemobservation_id SET DEFAULT nextval('stemobservation_stemobservation_id_seq'::regclass);
3562
ALTER TABLE stem ALTER COLUMN stem_id SET DEFAULT nextval('stem_stem_id_seq'::regclass);
3563 3563

  
3564 3564

  
3565 3565
--
......
4294 4294

  
4295 4295

  
4296 4296
--
4297
-- Name: stemobservation_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4297
-- Name: stem_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4298 4298
--
4299 4299

  
4300
ALTER TABLE ONLY stemobservation
4301
    ADD CONSTRAINT stemobservation_keys UNIQUE (individualplant_id, authorcode);
4300
ALTER TABLE ONLY stem
4301
    ADD CONSTRAINT stem_keys UNIQUE (individualplant_id, authorcode);
4302 4302

  
4303 4303

  
4304 4304
--
4305
-- Name: stemobservation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4305
-- Name: stem_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4306 4306
--
4307 4307

  
4308
ALTER TABLE ONLY stemobservation
4309
    ADD CONSTRAINT stemobservation_pkey PRIMARY KEY (stemobservation_id);
4308
ALTER TABLE ONLY stem
4309
    ADD CONSTRAINT stem_pkey PRIMARY KEY (stem_id);
4310 4310

  
4311 4311

  
4312 4312
--
......
4354 4354
--
4355 4355

  
4356 4356
ALTER TABLE ONLY taxondetermination
4357
    ADD CONSTRAINT taxondetermination_keys UNIQUE (taxonoccurrence_id, stemobservation_id, role_id, plantname_id, museumaccessionnumber);
4357
    ADD CONSTRAINT taxondetermination_keys UNIQUE (taxonoccurrence_id, stem_id, role_id, plantname_id, museumaccessionnumber);
4358 4358

  
4359 4359

  
4360 4360
--
......
4852 4852

  
4853 4853

  
4854 4854
--
4855
-- Name: emb_stemobservation_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4855
-- Name: emb_stem_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4856 4856
--
4857 4857

  
4858
CREATE INDEX emb_stemobservation_idx ON stemobservation USING btree (emb_stemobservation);
4858
CREATE INDEX emb_stem_idx ON stem USING btree (emb_stem);
4859 4859

  
4860 4860

  
4861 4861
--
......
5426 5426

  
5427 5427

  
5428 5428
--
5429
-- Name: stemobservation_individualplant_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5429
-- Name: stem_individualplant_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5430 5430
--
5431 5431

  
5432
CREATE INDEX stemobservation_individualplant_id_x ON stemobservation USING btree (individualplant_id);
5432
CREATE INDEX stem_individualplant_id_x ON stem USING btree (individualplant_id);
5433 5433

  
5434 5434

  
5435 5435
--
......
5545 5545

  
5546 5546

  
5547 5547
--
5548
-- Name: taxondetermination_stemobservation_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5548
-- Name: taxondetermination_stem_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5549 5549
--
5550 5550

  
5551
CREATE INDEX taxondetermination_stemobservation_id_x ON taxondetermination USING btree (stemobservation_id);
5551
CREATE INDEX taxondetermination_stem_id_x ON taxondetermination USING btree (stem_id);
5552 5552

  
5553 5553

  
5554 5554
--
......
6433 6433

  
6434 6434

  
6435 6435
--
6436
-- Name: stemobservation_individualplant_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6436
-- Name: stem_individualplant_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6437 6437
--
6438 6438

  
6439
ALTER TABLE ONLY stemobservation
6440
    ADD CONSTRAINT stemobservation_individualplant_id FOREIGN KEY (individualplant_id) REFERENCES individualplant(individualplant_id) ON UPDATE CASCADE ON DELETE CASCADE;
6439
ALTER TABLE ONLY stem
6440
    ADD CONSTRAINT stem_individualplant_id FOREIGN KEY (individualplant_id) REFERENCES individualplant(individualplant_id) ON UPDATE CASCADE ON DELETE CASCADE;
6441 6441

  
6442 6442

  
6443 6443
--
......
6569 6569

  
6570 6570

  
6571 6571
--
6572
-- Name: taxondetermination_stemobservation_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6572
-- Name: taxondetermination_stem_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6573 6573
--
6574 6574

  
6575 6575
ALTER TABLE ONLY taxondetermination
6576
    ADD CONSTRAINT taxondetermination_stemobservation_id FOREIGN KEY (stemobservation_id) REFERENCES stemobservation(stemobservation_id) ON UPDATE CASCADE ON DELETE CASCADE;
6576
    ADD CONSTRAINT taxondetermination_stem_id FOREIGN KEY (stem_id) REFERENCES stem(stem_id) ON UPDATE CASCADE ON DELETE CASCADE;
6577 6577

  
6578 6578

  
6579 6579
--
......
6609 6609

  
6610 6610

  
6611 6611
--
6612
-- Name: trait_stemobservation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6612
-- Name: trait_stem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6613 6613
--
6614 6614

  
6615 6615
ALTER TABLE ONLY trait
6616
    ADD CONSTRAINT trait_stemobservation_id_fkey FOREIGN KEY (stemobservation_id) REFERENCES stemobservation(stemobservation_id) ON UPDATE CASCADE ON DELETE CASCADE;
6616
    ADD CONSTRAINT trait_stem_id_fkey FOREIGN KEY (stem_id) REFERENCES stem(stem_id) ON UPDATE CASCADE ON DELETE CASCADE;
6617 6617

  
6618 6618

  
6619 6619
--

Also available in: Unified diff