#1888 closed defect (fixed)
change index for taxonomy_cwr
| Reported by: | Melanie Schori | Owned by: | Benjamin Haag |
|---|---|---|---|
| Priority: | medium | Milestone: | |
| Component: | Database, Schema Changes | Version: | N/A |
| Severity: | Keywords: | ||
| Cc: | benjamin.haag@…, kurt.endress@… | Database Engine: | N/A |
| Operating System: | N/A |
Description
Please change the uniqueness index for taxonomy_cwr to incorporate display_name and citation_id. In some cases, the species_id and crop_name will be identical but the display_name and citation_id are different, and I currently can't enter these records because they're flagged as duplicates.
I tried to assign this to Benjamin but he doesn't appear on the list of owners yet.
Change History (10)
comment:1 by , 7 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → accepted |
comment:2 by , 7 years ago
comment:3 by , 7 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
comment:4 by , 7 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
I need another change to incorporate the is_potential flag, which is currently preventing me from adding a couple of records. Potential vs confirmed uses form a search criterion, so I can't combine the data in one record.
comment:5 by , 7 years ago
Change implemented on DEV; see SQL below.
DROP INDEX [ndx_uniq_tcwr] ON [dbo].[taxonomy_cwr]
GO
CREATE UNIQUE NONCLUSTERED INDEX [ndx_uniq_tcwr] ON [dbo].[taxonomy_cwr]
(
[taxonomy_species_id] ASC,
[display_name] ASC,
[citation_id] ASC,
[crop_name] ASC,
[crop_common_name] ASC,
[genepool_code] ASC,
[is_graftstock_genepool] ASC,
[is_potential] ASC,
[ontology_trait_identifier] ASC,
[breeding_type_code] ASC
)
comment:8 by , 7 years ago
| Status: | reopened → addressed |
|---|
comment:9 by , 7 years ago
| Resolution: | → fixed |
|---|---|
| Status: | addressed → closed |
Resolution
1) Changes implemented in latest build (1.10.6) and in production.
2) Existing CWR table to be deprecated, and replaced with normalized tables, once PW code accessing CWR data has been completed.
comment:10 by , 6 years ago
| Component: | Database, Data Updates → Database, Schema Changes |
|---|

Ran the following SQL on prod ():
DROP INDEX [ndx_uniq_tcwr] ON [dbo].[taxonomy_cwr]
GO
CREATE UNIQUE NONCLUSTERED INDEX [ndx_uniq_tcwr] ON [dbo].[taxonomy_cwr]
(
)