Project

General

Profile

« Previous | Next » 

Revision 4934

schemas/vegbien.sql: Scope taxonpath instead of taxon with taxonscope, because a morphospecies name is specific to a datasource entity, so it should go in the datasource-specific taxonpath table instead of the datasource-general taxon table

View differences:

vegbien.my.sql
848 848
    forma text,
849 849
    cultivar text,
850 850
    otherranks text,
851
    scope_id int(11),
851 852
    accessioncode text
852 853
);
853 854

  
......
874 875

  
875 876

  
876 877
--
878
-- Name: COLUMN taxonpath.scope_id; Type: COMMENT; Schema: public; Owner: -
879
--
880

  
881

  
882

  
883

  
884
--
877 885
-- Name: analytical_db_view; Type: VIEW; Schema: public; Owner: -
878 886
--
879 887

  
......
2374 2382
CREATE TABLE taxon (
2375 2383
    taxon_id int(11) NOT NULL,
2376 2384
    parent_id int(11),
2377
    scope_id int(11),
2378 2385
    rank text NOT NULL,
2379 2386
    verbatimrank text,
2380 2387
    taxonname text NOT NULL,
......
4957 4964

  
4958 4965

  
4959 4966
--
4960
-- Name: taxon_scope_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4961
--
4962

  
4963
ALTER TABLE taxon
4964
    ADD CONSTRAINT taxon_scope_id_fkey FOREIGN KEY (scope_id) REFERENCES taxonscope(taxonscope_id) ON UPDATE CASCADE ON DELETE CASCADE;
4965

  
4966

  
4967
--
4968 4967
-- Name: taxonalt_taxondetermination_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4969 4968
--
4970 4969

  
......
5033 5032

  
5034 5033

  
5035 5034
--
5035
-- Name: taxonpath_scope_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5036
--
5037

  
5038
ALTER TABLE taxonpath
5039
    ADD CONSTRAINT taxonpath_scope_id_fkey FOREIGN KEY (scope_id) REFERENCES taxonscope(taxonscope_id) ON UPDATE CASCADE ON DELETE CASCADE;
5040

  
5041

  
5042
--
5036 5043
-- Name: taxonpath_taxon_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5037 5044
--
5038 5045

  

Also available in: Unified diff