Add is unique in migration v2 + refactor inferDeletionFromMissingEntities (#15070)

## Goal
- inferDeletionFromMissingEntities is now a map instead of a single
bool, allowing us to parameterise it based on the entity we want to
compare
- Adding index creation/update when field isUnique is set to true and
index deletion when isUnique is false (for now)

close https://github.com/twentyhq/core-team-issues/issues/1346
This commit is contained in:
Weiko
2025-10-15 16:08:13 +02:00
committed by GitHub
parent 7f8ec35b5d
commit c0ed246a03
29 changed files with 838 additions and 364 deletions
@@ -71,7 +71,6 @@ export class ServerlessFunctionV2Service {
},
buildOptions: {
isSystemBuild: false,
inferDeletionFromMissingEntities: false,
},
},
);
@@ -142,7 +141,6 @@ export class ServerlessFunctionV2Service {
},
buildOptions: {
isSystemBuild: false,
inferDeletionFromMissingEntities: false,
},
},
);
@@ -218,7 +216,6 @@ export class ServerlessFunctionV2Service {
},
},
buildOptions: {
inferDeletionFromMissingEntities: false,
isSystemBuild,
},
workspaceId,
@@ -298,7 +295,9 @@ export class ServerlessFunctionV2Service {
},
buildOptions: {
isSystemBuild,
inferDeletionFromMissingEntities: true,
inferDeletionFromMissingEntities: {
serverlessFunction: true,
},
},
workspaceId,
},