Project

General

Profile

« Previous | Next » 

Revision 4943

schemas/vegbien.sql: taxonpath: Renamed canon_id to canon_taxonpath_id to clarify that this is a recursive fkey. The convention is that a recursive fkey includes the table name plus a descriptive prefix.

View differences:

vegbien.my.sql
831 831
    taxonpath_id int(11) NOT NULL,
832 832
    datasource_id int(11) NOT NULL,
833 833
    plantcode text,
834
    canon_id int(11),
834
    canon_taxonpath_id int(11),
835 835
    taxon_id int(11),
836 836
    scientificname text,
837 837
    scientificnameauthor text,
......
5026 5026

  
5027 5027

  
5028 5028
--
5029
-- Name: taxonpath_canon_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5029
-- Name: taxonpath_canon_taxonpath_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5030 5030
--
5031 5031

  
5032 5032
ALTER TABLE taxonpath
5033
    ADD CONSTRAINT taxonpath_canon_id_fkey FOREIGN KEY (canon_id) REFERENCES taxonpath(taxonpath_id) ON UPDATE CASCADE ON DELETE CASCADE;
5033
    ADD CONSTRAINT taxonpath_canon_taxonpath_id_fkey FOREIGN KEY (canon_taxonpath_id) REFERENCES taxonpath(taxonpath_id) ON UPDATE CASCADE ON DELETE CASCADE;
5034 5034

  
5035 5035

  
5036 5036
--

Also available in: Unified diff