Identification cleanup (#17301)
# Introduction following https://github.com/twentyhq/twenty/pull/17279 As we've finally identified all the syncable metadata entities, which means they're expected to have non nullable applicationId and universalIdentifier at pg_level we can remove previous retro comp universalIdentifier fallbacking and update the dto too ~~This needs IdentifyRemainingEntitiesMetadataCommand and MakeRemainingEntitiesUniversalIdentifierAndApplicationIdNotNullableMigrationCommand to be run~~ ```ts [Nest] 197 - 01/21/2026, 3:08:35 PM LOG [MakeRemainingEntitiesUniversalIdentifierAndApplicationIdNotNullableMigrationCommand] Successfully run MakeRemainingEntitiesUniversalIdentifierAndApplicationIdNotNullableMigrationCommand ```
This commit is contained in:
+1
-2
@@ -96,8 +96,7 @@ export const fromCreateObjectInputToFlatObjectMetadataAndFlatFieldMetadatasToCre
|
||||
standardId: createObjectInput.standardId ?? null,
|
||||
standardOverrides: null,
|
||||
applicationId: workspaceCustomApplicationId,
|
||||
universalIdentifier:
|
||||
createObjectInput.universalIdentifier ?? objectMetadataId,
|
||||
universalIdentifier: createObjectInput.universalIdentifier ?? v4(),
|
||||
targetTableName: 'DEPRECATED',
|
||||
workspaceId,
|
||||
};
|
||||
|
||||
+2
@@ -27,6 +27,7 @@ export const fromFlatObjectMetadataToObjectMetadataDto = (
|
||||
workspaceId,
|
||||
imageIdentifierFieldMetadataId,
|
||||
labelIdentifierFieldMetadataId,
|
||||
applicationId,
|
||||
} = flatObjectMetadata;
|
||||
|
||||
return {
|
||||
@@ -52,5 +53,6 @@ export const fromFlatObjectMetadataToObjectMetadataDto = (
|
||||
standardOverrides: standardOverrides ?? undefined,
|
||||
shortcut: shortcut ?? undefined,
|
||||
duplicateCriteria: duplicateCriteria ?? undefined,
|
||||
applicationId,
|
||||
};
|
||||
};
|
||||
|
||||
+1
-4
@@ -14,11 +14,8 @@ export const fromObjectMetadataEntityToFlatObjectMetadata = (
|
||||
|
||||
return {
|
||||
...objectMetadataEntityWithoutRelations,
|
||||
// TODO remove once MakeObjectMetadataUniversalIdentifierAndApplicationIdNotNullableMigrationCommand has been run once
|
||||
universalIdentifier:
|
||||
objectMetadataEntityWithoutRelations.universalIdentifier ??
|
||||
objectMetadataEntityWithoutRelations.standardId ??
|
||||
objectMetadataEntityWithoutRelations.id,
|
||||
objectMetadataEntityWithoutRelations.universalIdentifier,
|
||||
createdAt: objectMetadataEntity.createdAt.toISOString(),
|
||||
updatedAt: objectMetadataEntity.updatedAt.toISOString(),
|
||||
viewIds: objectMetadataEntity.views.map((viewEntity) => viewEntity.id),
|
||||
|
||||
Reference in New Issue
Block a user