Project

General

Profile

« Previous | Next » 

Revision 1031

vegbien.sql: Point to covermethod from method instead of locationevent

View differences:

schemas/vegbien.my.sql
1080 1080
    sourceaccessioncode text,
1081 1081
    previous_id int(11),
1082 1082
    dateaccuracy text,
1083
    covermethod_id int(11),
1084 1083
    method_id int(11),
1085 1084
    methodnarrative text,
1086 1085
    taxonoccurrencearea double precision,
......
1271 1270
    observationmeasure text,
1272 1271
    observationmeasureunits text,
1273 1272
    taxonclassincluded text,
1274
    taxonclassexcluded text
1273
    taxonclassexcluded text,
1274
    covermethod_id int(11)
1275 1275
);
1276 1276

  
1277 1277

  
......
4876 4876

  
4877 4877

  
4878 4878
--
4879
-- Name: locationevent_covermethod_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4880
--
4881

  
4882
CREATE INDEX locationevent_covermethod_id_x ON locationevent  (covermethod_id);
4883

  
4884

  
4885
--
4886 4879
-- Name: locationevent_keys_accessioncode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4887 4880
--
4888 4881

  
......
5920 5913

  
5921 5914

  
5922 5915
--
5923
-- Name: locationevent_covermethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
5924
--
5925

  
5926
ALTER TABLE locationevent
5927
    ADD CONSTRAINT locationevent_covermethod_id FOREIGN KEY (covermethod_id) REFERENCES covermethod(covermethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
5928

  
5929

  
5930
--
5931 5916
-- Name: locationevent_location_id; Type: FK CONSTRAINT; Schema: public; Owner: -
5932 5917
--
5933 5918

  
......
6030 6015

  
6031 6016

  
6032 6017
--
6018
-- Name: method_covermethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6019
--
6020

  
6021
ALTER TABLE method
6022
    ADD CONSTRAINT method_covermethod_id FOREIGN KEY (covermethod_id) REFERENCES covermethod(covermethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
6023

  
6024

  
6025
--
6033 6026
-- Name: method_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6034 6027
--
6035 6028

  
schemas/vegbien.sql
1254 1254
    sourceaccessioncode text,
1255 1255
    previous_id integer,
1256 1256
    dateaccuracy text,
1257
    covermethod_id integer,
1258 1257
    method_id integer,
1259 1258
    methodnarrative text,
1260 1259
    taxonoccurrencearea double precision,
......
1460 1459
    observationmeasure text,
1461 1460
    observationmeasureunits text,
1462 1461
    taxonclassincluded text,
1463
    taxonclassexcluded text
1462
    taxonclassexcluded text,
1463
    covermethod_id integer
1464 1464
);
1465 1465

  
1466 1466

  
......
5320 5320

  
5321 5321

  
5322 5322
--
5323
-- Name: locationevent_covermethod_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5324
--
5325

  
5326
CREATE INDEX locationevent_covermethod_id_x ON locationevent USING btree (covermethod_id);
5327

  
5328

  
5329
--
5330 5323
-- Name: locationevent_keys_accessioncode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5331 5324
--
5332 5325

  
......
6375 6368

  
6376 6369

  
6377 6370
--
6378
-- Name: locationevent_covermethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6379
--
6380

  
6381
ALTER TABLE ONLY locationevent
6382
    ADD CONSTRAINT locationevent_covermethod_id FOREIGN KEY (covermethod_id) REFERENCES covermethod(covermethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
6383

  
6384

  
6385
--
6386 6371
-- Name: locationevent_location_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6387 6372
--
6388 6373

  
......
6487 6472

  
6488 6473

  
6489 6474
--
6475
-- Name: method_covermethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6476
--
6477

  
6478
ALTER TABLE ONLY method
6479
    ADD CONSTRAINT method_covermethod_id FOREIGN KEY (covermethod_id) REFERENCES covermethod(covermethod_id) ON UPDATE CASCADE ON DELETE CASCADE;
6480

  
6481

  
6482
--
6490 6483
-- Name: method_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6491 6484
--
6492 6485

  

Also available in: Unified diff