Project

General

Profile

« Previous | Next » 

Revision 5241

schemas/vegbien.sql: taxonconcept: Renamed definer_id to creator_id to allow merging with datasource_id when datasource_id is renamed to creator_id

View differences:

vegbien.sql
1114 1114
CREATE TABLE taxonconcept (
1115 1115
    taxonconcept_id integer NOT NULL,
1116 1116
    datasource_id integer NOT NULL,
1117
    definer_id integer,
1117
    creator_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.definer_id; Type: COMMENT; Schema: public; Owner: -
1155
-- Name: COLUMN taxonconcept.creator_id; Type: COMMENT; Schema: public; Owner: -
1156 1156
--
1157 1157

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

  
1160 1160

  
1161 1161
--
......
4738 4738
-- Name: taxonconcept_unique_within_datasource_by_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4739 4739
--
4740 4740

  
4741
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);
4741
CREATE UNIQUE INDEX taxonconcept_unique_within_datasource_by_name ON taxonconcept USING btree (datasource_id, (COALESCE(creator_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);
4742 4742

  
4743 4743

  
4744 4744
--
......
5745 5745

  
5746 5746

  
5747 5747
--
5748
-- Name: taxonconcept_datasource_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5748
-- Name: taxonconcept_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5749 5749
--
5750 5750

  
5751 5751
ALTER TABLE ONLY taxonconcept
5752
    ADD CONSTRAINT taxonconcept_datasource_id_fkey FOREIGN KEY (datasource_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5752
    ADD CONSTRAINT taxonconcept_creator_id_fkey FOREIGN KEY (creator_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5753 5753

  
5754 5754

  
5755 5755
--
5756
-- Name: taxonconcept_definer_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5756
-- Name: taxonconcept_datasource_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5757 5757
--
5758 5758

  
5759 5759
ALTER TABLE ONLY taxonconcept
5760
    ADD CONSTRAINT taxonconcept_definer_id_fkey FOREIGN KEY (definer_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5760
    ADD CONSTRAINT taxonconcept_datasource_id_fkey FOREIGN KEY (datasource_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5761 5761

  
5762 5762

  
5763 5763
--

Also available in: Unified diff