Project

General

Profile

« Previous | Next » 

Revision 555

vegbien.sql: Removed taxonoccurrence.currentdetermination_id and originaldetermination_id because it's not possible to create a two-way pointer when the child-to-parent pointer is required (chicken-and-egg problem)

View differences:

vegbien.sql
9 9
SET client_min_messages = warning;
10 10
SET escape_string_warning = off;
11 11

  
12
--
13
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: -
14
--
15

  
16
CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;
17

  
18

  
12 19
SET search_path = public, pg_catalog;
13 20

  
14 21
--
......
2574 2581
    int_currplantscinamenoauth character varying(255),
2575 2582
    int_currplantcommon character varying(255),
2576 2583
    int_currplantcode character varying(255),
2577
    accessioncode character varying(255),
2578
    currentdetermination_id integer,
2579
    originaldetermination_id integer
2584
    accessioncode character varying(255)
2580 2585
);
2581 2586

  
2582 2587

  
......
4978 4983

  
4979 4984

  
4980 4985
--
4981
-- Name: fki_taxonoccurrence_currentdetermination_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4982
--
4983

  
4984
CREATE INDEX fki_taxonoccurrence_currentdetermination_id ON taxonoccurrence USING btree (currentdetermination_id);
4985

  
4986

  
4987
--
4988 4986
-- Name: graphic_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4989 4987
--
4990 4988

  
......
6603 6601

  
6604 6602

  
6605 6603
--
6606
-- Name: taxonoccurrence_currentdetermination_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6607
--
6608

  
6609
ALTER TABLE ONLY taxonoccurrence
6610
    ADD CONSTRAINT taxonoccurrence_currentdetermination_id FOREIGN KEY (currentdetermination_id) REFERENCES taxondetermination(taxondetermination_id) ON UPDATE CASCADE ON DELETE CASCADE;
6611

  
6612

  
6613
--
6614 6604
-- Name: taxonoccurrence_locationevent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6615 6605
--
6616 6606

  
......
6619 6609

  
6620 6610

  
6621 6611
--
6622
-- Name: taxonoccurrence_originaldetermination_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6623
--
6624

  
6625
ALTER TABLE ONLY taxonoccurrence
6626
    ADD CONSTRAINT taxonoccurrence_originaldetermination_id FOREIGN KEY (originaldetermination_id) REFERENCES taxondetermination(taxondetermination_id) ON UPDATE CASCADE ON DELETE CASCADE;
6627

  
6628

  
6629
--
6630 6612
-- Name: taxonoccurrence_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6631 6613
--
6632 6614

  

Also available in: Unified diff