Project

General

Profile

« Previous | Next » 

Revision 5136

schemas/vegbien.sql: taxonpath: Renamed plantcode to identifyingtaxonomicname so that it can be used to store the concatenated taxonomicname that gets scrubbed. This enables ignoring the name components when the full name is specified, so that when a TNRS submitted name's matched components are included in its taxonpath, this will not prevent a datasource's concatenated name (without the matched components) from matching up with the corresponding TNRS submitted name.

View differences:

schemas/vegbien.my.sql
839 839
CREATE TABLE taxonpath (
840 840
    taxonpath_id int(11) NOT NULL,
841 841
    datasource_id int(11) NOT NULL,
842
    plantcode text,
842
    identifyingtaxonomicname text,
843 843
    canon_taxonpath_id int(11),
844 844
    taxon_id int(11),
845 845
    taxonomicname text,
......
871 871

  
872 872

  
873 873
--
874
-- Name: COLUMN taxonpath.plantcode; Type: COMMENT; Schema: public; Owner: -
874
-- Name: COLUMN taxonpath.identifyingtaxonomicname; Type: COMMENT; Schema: public; Owner: -
875 875
--
876 876

  
877 877

  
......
4140 4140

  
4141 4141

  
4142 4142
--
4143
-- Name: taxonpath_unique_within_datasource_by_code; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4143
-- Name: taxonpath_unique_within_datasource_by_identifying_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4144 4144
--
4145 4145

  
4146 4146

  
schemas/vegbien.sql
1154 1154
CREATE TABLE taxonpath (
1155 1155
    taxonpath_id integer NOT NULL,
1156 1156
    datasource_id integer NOT NULL,
1157
    plantcode text,
1157
    identifyingtaxonomicname text,
1158 1158
    canon_taxonpath_id integer,
1159 1159
    taxon_id integer,
1160 1160
    taxonomicname text,
......
1188 1188

  
1189 1189

  
1190 1190
--
1191
-- Name: COLUMN taxonpath.plantcode; Type: COMMENT; Schema: public; Owner: -
1191
-- Name: COLUMN taxonpath.identifyingtaxonomicname; Type: COMMENT; Schema: public; Owner: -
1192 1192
--
1193 1193

  
1194
COMMENT ON COLUMN taxonpath.plantcode IS 'The datasource''s unique identifier for this taxonomic name.';
1194
COMMENT ON COLUMN taxonpath.identifyingtaxonomicname IS 'The taxonomic name that uniquely identifies this taxonpath. If set, the other fields will not be used in duplicate elimination.';
1195 1195

  
1196 1196

  
1197 1197
--
......
4774 4774

  
4775 4775

  
4776 4776
--
4777
-- Name: taxonpath_unique_within_datasource_by_code; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4777
-- Name: taxonpath_unique_within_datasource_by_identifying_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4778 4778
--
4779 4779

  
4780
CREATE UNIQUE INDEX taxonpath_unique_within_datasource_by_code ON taxonpath USING btree (datasource_id, (COALESCE(plantcode, '\\N'::text))) WHERE (plantcode IS NOT NULL);
4780
CREATE UNIQUE INDEX taxonpath_unique_within_datasource_by_identifying_name ON taxonpath USING btree (datasource_id, (COALESCE(identifyingtaxonomicname, '\\N'::text))) WHERE (identifyingtaxonomicname IS NOT NULL);
4781 4781

  
4782 4782

  
4783 4783
--
4784 4784
-- Name: taxonpath_unique_within_datasource_by_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4785 4785
--
4786 4786

  
4787
CREATE UNIQUE INDEX taxonpath_unique_within_datasource_by_name ON taxonpath USING btree (datasource_id, (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(otherranks, ARRAY[]::rankedtaxonname[])), (COALESCE(scope_id, 2147483647))) WHERE (plantcode IS NULL);
4787
CREATE UNIQUE INDEX taxonpath_unique_within_datasource_by_name ON taxonpath USING btree (datasource_id, (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(otherranks, ARRAY[]::rankedtaxonname[])), (COALESCE(scope_id, 2147483647))) WHERE (identifyingtaxonomicname IS NULL);
4788 4788

  
4789 4789

  
4790 4790
--

Also available in: Unified diff