Project

General

Profile

« Previous | Next » 

Revision 907

vegbien.sql: Renamed plotmethod to method

View differences:

schemas/vegbien.my.sql
1040 1040
    covermethod_id int(11),
1041 1041
    coverdispersion text,
1042 1042
    autotaxoncover int(1),
1043
    plotmethod_id int(11),
1043
    method_id int(11),
1044 1044
    methodnarrative text,
1045 1045
    taxonoccurrencearea double precision,
1046 1046
    stemsizelimit double precision,
......
1211 1211

  
1212 1212

  
1213 1213
--
1214
-- Name: method; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1215
--
1216

  
1217
CREATE TABLE method (
1218
    method_id int(11) NOT NULL,
1219
    reference_id int(11),
1220
    name text NOT NULL,
1221
    description text,
1222
    accessioncode text
1223
);
1224

  
1225

  
1226
--
1227
-- Name: method_method_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1228
--
1229

  
1230

  
1231

  
1232

  
1233
--
1234
-- Name: method_method_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1235
--
1236

  
1237

  
1238

  
1239

  
1240
--
1214 1241
-- Name: namedplace; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1215 1242
--
1216 1243

  
......
1695 1722

  
1696 1723

  
1697 1724
--
1698
-- Name: plotmethod; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1699
--
1700

  
1701
CREATE TABLE plotmethod (
1702
    plotmethod_id int(11) NOT NULL,
1703
    reference_id int(11),
1704
    name text NOT NULL,
1705
    description text,
1706
    accessioncode text
1707
);
1708

  
1709

  
1710
--
1711
-- Name: plotmethod_plotmethod_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1712
--
1713

  
1714

  
1715

  
1716

  
1717
--
1718
-- Name: plotmethod_plotmethod_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1719
--
1720

  
1721

  
1722

  
1723

  
1724
--
1725 1725
-- Name: project; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1726 1726
--
1727 1727

  
......
3165 3165

  
3166 3166

  
3167 3167
--
3168
-- Name: method_id; Type: DEFAULT; Schema: public; Owner: -
3169
--
3170

  
3171

  
3172

  
3173

  
3174
--
3168 3175
-- Name: namedplace_id; Type: DEFAULT; Schema: public; Owner: -
3169 3176
--
3170 3177

  
......
3277 3284

  
3278 3285

  
3279 3286
--
3280
-- Name: plotmethod_id; Type: DEFAULT; Schema: public; Owner: -
3281
--
3282

  
3283

  
3284

  
3285

  
3286
--
3287 3287
-- Name: project_id; Type: DEFAULT; Schema: public; Owner: -
3288 3288
--
3289 3289

  
......
3903 3903

  
3904 3904

  
3905 3905
--
3906
-- Name: method_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3907
--
3908

  
3909
ALTER TABLE method
3910
    ADD CONSTRAINT method_pkey PRIMARY KEY (method_id);
3911

  
3912

  
3913
--
3906 3914
-- Name: namedplace_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3907 3915
--
3908 3916

  
......
4055 4063

  
4056 4064

  
4057 4065
--
4058
-- Name: plotmethod_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4059
--
4060

  
4061
ALTER TABLE plotmethod
4062
    ADD CONSTRAINT plotmethod_pkey PRIMARY KEY (plotmethod_id);
4063

  
4064

  
4065
--
4066 4066
-- Name: project_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4067 4067
--
4068 4068

  
......
4823 4823

  
4824 4824

  
4825 4825
--
4826
-- Name: fki_locationevent_plotmethod_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4826
-- Name: fki_locationevent_method_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4827 4827
--
4828 4828

  
4829
CREATE INDEX fki_locationevent_plotmethod_id ON locationevent  (plotmethod_id);
4829
CREATE INDEX fki_locationevent_method_id ON locationevent  (method_id);
4830 4830

  
4831 4831

  
4832 4832
--
4833
-- Name: fki_method_reference_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4834
--
4835

  
4836
CREATE INDEX fki_method_reference_id ON method  (reference_id);
4837

  
4838

  
4839
--
4833 4840
-- Name: fki_plantconcept_scope_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4834 4841
--
4835 4842

  
......
4872 4879

  
4873 4880

  
4874 4881
--
4875
-- Name: fki_plotmethod_reference_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4876
--
4877

  
4878
CREATE INDEX fki_plotmethod_reference_id ON plotmethod  (reference_id);
4879

  
4880

  
4881
--
4882 4882
-- Name: fki_specimenreplicate_museum_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4883 4883
--
4884 4884

  
......
5054 5054

  
5055 5055

  
5056 5056
--
5057
-- Name: method_accessioncode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5058
--
5059

  
5060
CREATE UNIQUE INDEX method_accessioncode ON method  (accessioncode);
5061

  
5062

  
5063
--
5057 5064
-- Name: namedplace_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5058 5065
--
5059 5066

  
......
5334 5341

  
5335 5342

  
5336 5343
--
5337
-- Name: plotmethod_accessioncode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5338
--
5339

  
5340
CREATE UNIQUE INDEX plotmethod_accessioncode ON plotmethod  (accessioncode);
5341

  
5342

  
5343
--
5344 5344
-- Name: project_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5345 5345
--
5346 5346

  
......
6037 6037

  
6038 6038

  
6039 6039
--
6040
-- Name: locationevent_plotmethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6040
-- Name: locationevent_method_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6041 6041
--
6042 6042

  
6043 6043
ALTER TABLE locationevent
6044
    ADD CONSTRAINT locationevent_plotmethod_id FOREIGN KEY (plotmethod_id) REFERENCES plotmethod(plotmethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
6044
    ADD CONSTRAINT locationevent_method_id FOREIGN KEY (method_id) REFERENCES method(method_id) ON UPDATE CASCADE ON DELETE CASCADE;
6045 6045

  
6046 6046

  
6047 6047
--
......
6123 6123

  
6124 6124

  
6125 6125
--
6126
-- Name: method_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6127
--
6128

  
6129

  
6130

  
6131

  
6132
--
6126 6133
-- Name: namedplace_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6127 6134
--
6128 6135

  
......
6356 6363

  
6357 6364

  
6358 6365
--
6359
-- Name: plotmethod_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6360
--
6361

  
6362

  
6363

  
6364

  
6365
--
6366 6366
-- Name: project_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6367 6367
--
6368 6368

  
schemas/vegbien_empty.sql
34 34
TRUNCATE locationevent CASCADE;
35 35
TRUNCATE locationeventcontributor CASCADE;
36 36
TRUNCATE locationeventsynonym CASCADE;
37
TRUNCATE method CASCADE;
37 38
TRUNCATE namedplace CASCADE;
38 39
TRUNCATE namedplacecorrelation CASCADE;
39 40
TRUNCATE note CASCADE;
......
50 51
TRUNCATE plantstatus CASCADE;
51 52
TRUNCATE planttag CASCADE;
52 53
TRUNCATE plantusage CASCADE;
53
TRUNCATE plotmethod CASCADE;
54 54
TRUNCATE project CASCADE;
55 55
TRUNCATE projectcontributor CASCADE;
56 56
TRUNCATE reference CASCADE;
schemas/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