Project

General

Profile

« Previous | Next » 

Revision 497

vegbien.sql: Changed taxondetermination.stem_id to individualplant_id

View differences:

schemas/vegbien.sql
2499 2499
CREATE TABLE taxondetermination (
2500 2500
    taxondetermination_id integer NOT NULL,
2501 2501
    taxonoccurrence_id integer NOT NULL,
2502
    stem_id integer,
2502
    individualplant_id integer,
2503 2503
    plantconcept_id integer,
2504 2504
    plantname_id integer NOT NULL,
2505 2505
    party_id integer NOT NULL,
......
4358 4358
--
4359 4359

  
4360 4360
ALTER TABLE ONLY taxondetermination
4361
    ADD CONSTRAINT taxondetermination_keys UNIQUE (taxonoccurrence_id, stem_id, role_id, plantname_id, museumaccessionnumber);
4361
    ADD CONSTRAINT taxondetermination_keys UNIQUE (taxonoccurrence_id, individualplant_id, role_id, plantname_id, museumaccessionnumber);
4362 4362

  
4363 4363

  
4364 4364
--
......
4919 4919

  
4920 4920

  
4921 4921
--
4922
-- Name: fki_taxondetermination_individualplant_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4923
--
4924

  
4925
CREATE INDEX fki_taxondetermination_individualplant_id ON taxondetermination USING btree (individualplant_id);
4926

  
4927

  
4928
--
4922 4929
-- Name: graphic_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4923 4930
--
4924 4931

  
......
5552 5559
-- Name: taxondetermination_stem_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5553 5560
--
5554 5561

  
5555
CREATE INDEX taxondetermination_stem_id_x ON taxondetermination USING btree (stem_id);
5562
CREATE INDEX taxondetermination_stem_id_x ON taxondetermination USING btree (individualplant_id);
5556 5563

  
5557 5564

  
5558 5565
--
......
6517 6524

  
6518 6525

  
6519 6526
--
6527
-- Name: taxondetermination_individualplant_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6528
--
6529

  
6530
ALTER TABLE ONLY taxondetermination
6531
    ADD CONSTRAINT taxondetermination_individualplant_id FOREIGN KEY (individualplant_id) REFERENCES individualplant(individualplant_id) ON UPDATE CASCADE ON DELETE CASCADE;
6532

  
6533

  
6534
--
6520 6535
-- Name: taxondetermination_museum_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6521 6536
--
6522 6537

  
......
6573 6588

  
6574 6589

  
6575 6590
--
6576
-- Name: taxondetermination_stem_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6577
--
6578

  
6579
ALTER TABLE ONLY taxondetermination
6580
    ADD CONSTRAINT taxondetermination_stem_id FOREIGN KEY (stem_id) REFERENCES stem(stem_id) ON UPDATE CASCADE ON DELETE CASCADE;
6581

  
6582

  
6583
--
6584 6591
-- Name: taxondetermination_taxonoccurrence_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6585 6592
--
6586 6593

  

Also available in: Unified diff