Revision 5135
Added by Aaron Marcuse-Kubitza over 12 years ago
vegbien.sql | ||
---|---|---|
1159 | 1159 |
taxon_id integer, |
1160 | 1160 |
taxonomicname text, |
1161 | 1161 |
author text, |
1162 |
taxonomicnamewithauthor text NOT NULL,
|
|
1162 |
taxonomicnamewithauthor text, |
|
1163 | 1163 |
domain text, |
1164 | 1164 |
kingdom text, |
1165 | 1165 |
phylum text, |
... | ... | |
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, taxonomicnamewithauthor) 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 (plantcode IS NULL);
|
|
4788 | 4788 |
|
4789 | 4789 |
|
4790 | 4790 |
-- |
Also available in: Unified diff
schemas/vegbien.sql: taxonpath: Made taxonomicnamewithauthor optional again and include all columns in the taxonpath_unique_within_datasource_by_name unique index so that the original name components can be stored in a separate taxonpath from the taxonpath with the concatenated taxonomic name. (The datasource's taxonpath would not always contain an entry for taxonomicnamewithauthor, so the other columns also need to be used in the unique index.)