Skip to main content

After upgrading he SF from 2022.1 tot 2023.1, an existing model (± 5 years of development), is giving the following error:
 

The error, stating ‘Unique index is equal to the full primary key’

The consequence, according to the SF is the following:
 

The consequence of this error, stating ‘Foreign key constraints may introduce dependencies on this unique index, causing it to become difficult to delete or re-apply. This will also result in errors during full code execution’

However, when going through all the steps of creation, no errors occur.
The solution, according to the SF:

The solution of this error, stating that ‘Changing the index columns to not be equal tot he full primary key or delete the index’

Since this was fine in version 2022.1, it is unclear what to do here.

This was developed in collaboration with the professional services of Thinkwise. The usage if mainly for primary keys that include a date. All these indexes have the extension _unieke_datum (_unique_date but in Dutch). The exact thoughts behind these indexes are unclear to me, but I assume some sort of search optimization, when a primary key with a date is used (for example, discounts on articles that start at a certain date).

How should we tackle this validation message?

Hi,

This validation checks the existence of a unique indexes on tables that do not differ from the Primary key. As the Primary key is unique by itself, having a unique index that is the same is redundant.

To resolve, navigate to the table you get this error on, look through the unique index(es) and remove the one that shares all its index columns with the columns in the Primary key.


Hi,

This validation checks the existence of a unique indexes on tables that do not differ from the Primary key. As the Primary key is unique by itself, having a unique index that is the same is redundant.

To resolve, navigate to the table you get this error on, look through the unique index(es) and remove the one that shares all its index columns with the columns in the Primary key.

Hi Mark,

Thanks for your quick reply.
Since you say this index is now redundant, we will remove it when upgrading.