Project

General

Profile

« Previous | Next » 

Revision 5292

schemas/vegbien.sql: taxonconcept: taxonconcept_unique_within_creator_by_name unique index: Fixed bug where index filter overlapped with taxonconcept_unique_within_parent's index filter, causing these unique indexes to sometimes both apply at the same time and prevent column-based import from correctly choosing which index to use for each taxonconcept import

View differences:

vegbien.sql
4627 4627
-- Name: taxonconcept_unique_within_creator_by_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4628 4628
--
4629 4629

  
4630
CREATE UNIQUE INDEX taxonconcept_unique_within_creator_by_name ON taxonconcept USING btree (creator_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(taxonname, '\\N'::text))) WHERE (identifyingtaxonomicname IS NULL);
4630
CREATE UNIQUE INDEX taxonconcept_unique_within_creator_by_name ON taxonconcept USING btree (creator_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(taxonname, '\\N'::text))) WHERE ((identifyingtaxonomicname IS NULL) AND ((taxonname IS NULL) OR (parent_id IS NULL)));
4631 4631

  
4632 4632

  
4633 4633
--

Also available in: Unified diff