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
-1
@@ -48,7 +48,7 @@ export const fromCreateRoleInputToFlatRoleToCreate = ({
|
||||
workspaceId,
|
||||
createdAt: now,
|
||||
updatedAt: now,
|
||||
universalIdentifier: createRoleInput.universalIdentifier ?? id,
|
||||
universalIdentifier: createRoleInput.universalIdentifier ?? v4(),
|
||||
applicationId,
|
||||
roleTargetIds: [],
|
||||
objectPermissionIds: [],
|
||||
|
||||
+2
-2
@@ -21,8 +21,8 @@ export const fromRoleEntityToFlatRole = (role: RoleEntity): FlatRole => {
|
||||
workspaceId: role.workspaceId,
|
||||
createdAt: role.createdAt.toISOString(),
|
||||
updatedAt: role.updatedAt.toISOString(),
|
||||
universalIdentifier: role.universalIdentifier ?? role.standardId ?? role.id,
|
||||
applicationId: role.applicationId ?? null,
|
||||
universalIdentifier: role.universalIdentifier,
|
||||
applicationId: role.applicationId,
|
||||
roleTargetIds: role.roleTargets.map((rt) => rt.id),
|
||||
objectPermissionIds: role.objectPermissions.map((op) => op.id),
|
||||
permissionFlagIds: role.permissionFlags.map((pf) => pf.id),
|
||||
|
||||
Reference in New Issue
Block a user