Unique fields - fixes (#13848)

- Enable update to unique for composite field with defaultValue
different from default defaultValue on subfield not included in unique
constraint
- Enable update to unique for standard field + Disable update to
non-unique for standard index
- Fix typo

Fixes https://github.com/twentyhq/core-team-issues/issues/1360
This commit is contained in:
Etienne
2025-08-13 08:40:46 +02:00
committed by GitHub
parent f63fe5d478
commit 6936993557
18 changed files with 322 additions and 25 deletions
@@ -257,7 +257,7 @@ export class WorkspaceMigrationRunnerService {
`Unique index creation failed because of unique constraint violation`,
IndexMetadataExceptionCode.INDEX_CREATION_FAILED,
{
userFriendlyMessage: t`Cannot enable uniqueness due to existing duplicate values. Please review and fix your data first.`,
userFriendlyMessage: t`Cannot enable uniqueness due to existing duplicate values. Please review and fix your data first (including soft deleted records).`,
},
);
}