Skip to main content
Solved

Validation Error after upgrading SF - Unique index is equal to the full primary key


Forum|alt.badge.img

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?

Best answer by Mark Jongeling

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.

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

2 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3936 replies
  • Answer
  • December 8, 2023

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.


Forum|alt.badge.img
Mark Jongeling wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings