Project

General

Profile

« Previous | Next » 

Revision 5235

schemas/vegbien.sql: taxonconcept: Renamed concept_reference_id to definer_id because this is a clearer name and because this will allow merging with datasource_id, which serves the same purpose

View differences:

vegbien.sql
1114 1114
CREATE TABLE taxonconcept (
1115 1115
    taxonconcept_id integer NOT NULL,
1116 1116
    datasource_id integer NOT NULL,
1117
    concept_reference_id integer,
1117
    definer_id integer,
1118 1118
    identifyingtaxonomicname text,
1119 1119
    canon_taxonconcept_id integer,
1120 1120
    taxon_id integer,
......
1152 1152

  
1153 1153

  
1154 1154
--
1155
-- Name: COLUMN taxonconcept.concept_reference_id; Type: COMMENT; Schema: public; Owner: -
1155
-- Name: COLUMN taxonconcept.definer_id; Type: COMMENT; Schema: public; Owner: -
1156 1156
--
1157 1157

  
1158
COMMENT ON COLUMN taxonconcept.concept_reference_id IS 'The entity that defined the taxon concept.';
1158
COMMENT ON COLUMN taxonconcept.definer_id IS 'The entity that defined the taxon concept.';
1159 1159

  
1160 1160

  
1161 1161
--
......
4731 4731
-- Name: taxonconcept_unique_within_datasource_by_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4732 4732
--
4733 4733

  
4734
CREATE UNIQUE INDEX taxonconcept_unique_within_datasource_by_name ON taxonconcept USING btree (datasource_id, (COALESCE(concept_reference_id, 2147483647)), (COALESCE(taxonomicname, '\\N'::text)), (COALESCE(author, '\\N'::text)), (COALESCE(taxonomicnamewithauthor, '\\N'::text)), (COALESCE(domain, '\\N'::text)), (COALESCE(kingdom, '\\N'::text)), (COALESCE(phylum, '\\N'::text)), (COALESCE(class, '\\N'::text)), (COALESCE("order", '\\N'::text)), (COALESCE(family, '\\N'::text)), (COALESCE(genus, '\\N'::text)), (COALESCE(species, '\\N'::text)), (COALESCE(subspecies, '\\N'::text)), (COALESCE(variety, '\\N'::text)), (COALESCE(forma, '\\N'::text)), (COALESCE(cultivar, '\\N'::text)), (COALESCE(morphospecies, '\\N'::text)), (COALESCE(otherranks, ARRAY[]::rankedtaxonname[]))) WHERE (identifyingtaxonomicname IS NULL);
4734
CREATE UNIQUE INDEX taxonconcept_unique_within_datasource_by_name ON taxonconcept USING btree (datasource_id, (COALESCE(definer_id, 2147483647)), (COALESCE(taxonomicname, '\\N'::text)), (COALESCE(author, '\\N'::text)), (COALESCE(taxonomicnamewithauthor, '\\N'::text)), (COALESCE(domain, '\\N'::text)), (COALESCE(kingdom, '\\N'::text)), (COALESCE(phylum, '\\N'::text)), (COALESCE(class, '\\N'::text)), (COALESCE("order", '\\N'::text)), (COALESCE(family, '\\N'::text)), (COALESCE(genus, '\\N'::text)), (COALESCE(species, '\\N'::text)), (COALESCE(subspecies, '\\N'::text)), (COALESCE(variety, '\\N'::text)), (COALESCE(forma, '\\N'::text)), (COALESCE(cultivar, '\\N'::text)), (COALESCE(morphospecies, '\\N'::text)), (COALESCE(otherranks, ARRAY[]::rankedtaxonname[]))) WHERE (identifyingtaxonomicname IS NULL);
4735 4735

  
4736 4736

  
4737 4737
--
......
5738 5738

  
5739 5739

  
5740 5740
--
5741
-- Name: taxonconcept_concept_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5741
-- Name: taxonconcept_datasource_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5742 5742
--
5743 5743

  
5744 5744
ALTER TABLE ONLY taxonconcept
5745
    ADD CONSTRAINT taxonconcept_concept_reference_id_fkey FOREIGN KEY (concept_reference_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5745
    ADD CONSTRAINT taxonconcept_datasource_id_fkey FOREIGN KEY (datasource_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5746 5746

  
5747 5747

  
5748 5748
--
5749
-- Name: taxonconcept_datasource_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5749
-- Name: taxonconcept_definer_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5750 5750
--
5751 5751

  
5752 5752
ALTER TABLE ONLY taxonconcept
5753
    ADD CONSTRAINT taxonconcept_datasource_id_fkey FOREIGN KEY (datasource_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5753
    ADD CONSTRAINT taxonconcept_definer_id_fkey FOREIGN KEY (definer_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5754 5754

  
5755 5755

  
5756 5756
--

Also available in: Unified diff