Project

General

Profile

« Previous | Next » 

Revision 907

vegbien.sql: Renamed plotmethod to method

View differences:

vegbien.sql
1211 1211
    covermethod_id integer,
1212 1212
    coverdispersion text,
1213 1213
    autotaxoncover boolean,
1214
    plotmethod_id integer,
1214
    method_id integer,
1215 1215
    methodnarrative text,
1216 1216
    taxonoccurrencearea double precision,
1217 1217
    stemsizelimit double precision,
......
1397 1397

  
1398 1398

  
1399 1399
--
1400
-- Name: method; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1401
--
1402

  
1403
CREATE TABLE method (
1404
    method_id integer NOT NULL,
1405
    reference_id integer,
1406
    name text NOT NULL,
1407
    description text,
1408
    accessioncode text
1409
);
1410

  
1411

  
1412
--
1413
-- Name: method_method_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1414
--
1415

  
1416
CREATE SEQUENCE method_method_id_seq
1417
    START WITH 1
1418
    INCREMENT BY 1
1419
    NO MINVALUE
1420
    NO MAXVALUE
1421
    CACHE 1;
1422

  
1423

  
1424
--
1425
-- Name: method_method_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1426
--
1427

  
1428
ALTER SEQUENCE method_method_id_seq OWNED BY method.method_id;
1429

  
1430

  
1431
--
1400 1432
-- Name: namedplace; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1401 1433
--
1402 1434

  
......
1961 1993

  
1962 1994

  
1963 1995
--
1964
-- Name: plotmethod; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1965
--
1966

  
1967
CREATE TABLE plotmethod (
1968
    plotmethod_id integer NOT NULL,
1969
    reference_id integer,
1970
    name text NOT NULL,
1971
    description text,
1972
    accessioncode text
1973
);
1974

  
1975

  
1976
--
1977
-- Name: plotmethod_plotmethod_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1978
--
1979

  
1980
CREATE SEQUENCE plotmethod_plotmethod_id_seq
1981
    START WITH 1
1982
    INCREMENT BY 1
1983
    NO MINVALUE
1984
    NO MAXVALUE
1985
    CACHE 1;
1986

  
1987

  
1988
--
1989
-- Name: plotmethod_plotmethod_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1990
--
1991

  
1992
ALTER SEQUENCE plotmethod_plotmethod_id_seq OWNED BY plotmethod.plotmethod_id;
1993

  
1994

  
1995
--
1996 1996
-- Name: project; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1997 1997
--
1998 1998

  
......
3621 3621

  
3622 3622

  
3623 3623
--
3624
-- Name: method_id; Type: DEFAULT; Schema: public; Owner: -
3625
--
3626

  
3627
ALTER TABLE method ALTER COLUMN method_id SET DEFAULT nextval('method_method_id_seq'::regclass);
3628

  
3629

  
3630
--
3624 3631
-- Name: namedplace_id; Type: DEFAULT; Schema: public; Owner: -
3625 3632
--
3626 3633

  
......
3733 3740

  
3734 3741

  
3735 3742
--
3736
-- Name: plotmethod_id; Type: DEFAULT; Schema: public; Owner: -
3737
--
3738

  
3739
ALTER TABLE plotmethod ALTER COLUMN plotmethod_id SET DEFAULT nextval('plotmethod_plotmethod_id_seq'::regclass);
3740

  
3741

  
3742
--
3743 3743
-- Name: project_id; Type: DEFAULT; Schema: public; Owner: -
3744 3744
--
3745 3745

  
......
4359 4359

  
4360 4360

  
4361 4361
--
4362
-- Name: method_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4363
--
4364

  
4365
ALTER TABLE ONLY method
4366
    ADD CONSTRAINT method_pkey PRIMARY KEY (method_id);
4367

  
4368

  
4369
--
4362 4370
-- Name: namedplace_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4363 4371
--
4364 4372

  
......
4511 4519

  
4512 4520

  
4513 4521
--
4514
-- Name: plotmethod_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4515
--
4516

  
4517
ALTER TABLE ONLY plotmethod
4518
    ADD CONSTRAINT plotmethod_pkey PRIMARY KEY (plotmethod_id);
4519

  
4520

  
4521
--
4522 4522
-- Name: project_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4523 4523
--
4524 4524

  
......
5279 5279

  
5280 5280

  
5281 5281
--
5282
-- Name: fki_locationevent_plotmethod_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5282
-- Name: fki_locationevent_method_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5283 5283
--
5284 5284

  
5285
CREATE INDEX fki_locationevent_plotmethod_id ON locationevent USING btree (plotmethod_id);
5285
CREATE INDEX fki_locationevent_method_id ON locationevent USING btree (method_id);
5286 5286

  
5287 5287

  
5288 5288
--
5289
-- Name: fki_method_reference_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5290
--
5291

  
5292
CREATE INDEX fki_method_reference_id ON method USING btree (reference_id);
5293

  
5294

  
5295
--
5289 5296
-- Name: fki_plantconcept_scope_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5290 5297
--
5291 5298

  
......
5328 5335

  
5329 5336

  
5330 5337
--
5331
-- Name: fki_plotmethod_reference_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5332
--
5333

  
5334
CREATE INDEX fki_plotmethod_reference_id ON plotmethod USING btree (reference_id);
5335

  
5336

  
5337
--
5338 5338
-- Name: fki_specimenreplicate_museum_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5339 5339
--
5340 5340

  
......
5510 5510

  
5511 5511

  
5512 5512
--
5513
-- Name: method_accessioncode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5514
--
5515

  
5516
CREATE UNIQUE INDEX method_accessioncode ON method USING btree (accessioncode);
5517

  
5518

  
5519
--
5513 5520
-- Name: namedplace_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5514 5521
--
5515 5522

  
......
5790 5797

  
5791 5798

  
5792 5799
--
5793
-- Name: plotmethod_accessioncode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5794
--
5795

  
5796
CREATE UNIQUE INDEX plotmethod_accessioncode ON plotmethod USING btree (accessioncode);
5797

  
5798

  
5799
--
5800 5800
-- Name: project_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5801 5801
--
5802 5802

  
......
6504 6504

  
6505 6505

  
6506 6506
--
6507
-- Name: locationevent_plotmethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6507
-- Name: locationevent_method_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6508 6508
--
6509 6509

  
6510 6510
ALTER TABLE ONLY locationevent
6511
    ADD CONSTRAINT locationevent_plotmethod_id FOREIGN KEY (plotmethod_id) REFERENCES plotmethod(plotmethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
6511
    ADD CONSTRAINT locationevent_method_id FOREIGN KEY (method_id) REFERENCES method(method_id) ON UPDATE CASCADE ON DELETE CASCADE;
6512 6512

  
6513 6513

  
6514 6514
--
......
6592 6592

  
6593 6593

  
6594 6594
--
6595
-- Name: method_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6596
--
6597

  
6598
ALTER TABLE ONLY method
6599
    ADD CONSTRAINT method_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
6600

  
6601

  
6602
--
6595 6603
-- Name: namedplace_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6596 6604
--
6597 6605

  
......
6832 6840

  
6833 6841

  
6834 6842
--
6835
-- Name: plotmethod_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6836
--
6837

  
6838
ALTER TABLE ONLY plotmethod
6839
    ADD CONSTRAINT plotmethod_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
6840

  
6841

  
6842
--
6843 6843
-- Name: project_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6844 6844
--
6845 6845

  

Also available in: Unified diff