Update unique fields on standard field - include soft deleted records (#14562)

Done : 
- migrate standard unique fields (add : -old)
- deactivate defaultWhereClause
- restore soft deleted if upserted (same for contact creation in mailing
sync)

fixes https://github.com/twentyhq/twenty/issues/14443

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Etienne
2025-10-11 15:50:29 +02:00
committed by GitHub
parent c681fb7fb6
commit 560e24fa4b
26 changed files with 1119 additions and 316 deletions
@@ -19,7 +19,7 @@ export function WorkspaceIsUnique(): PropertyDecorator {
const columns = [propertyKey.toString()];
metadataArgsStorage.addIndexes({
name: `IDX_UNIQUE_${generateDeterministicIndexName([
name: `IDX_${generateDeterministicIndexName([
convertClassNameToObjectMetadataName(target.constructor.name),
...columns,
])}`,