Add applicationId to syncableEntity and fix syncApp deletion (#15170)
## Context - All flatEntity should extend SyncableEntity - SyncableEntity should now have applicationId and application relation - Fix syncApp deletion, should now properly use migration v2 to delete syncable entities
This commit is contained in:
+1
@@ -44,6 +44,7 @@ export const generateIndexForFlatFieldMetadata = ({
|
||||
universalIdentifier: indexId,
|
||||
updatedAt: createdAt,
|
||||
workspaceId,
|
||||
applicationId: null,
|
||||
},
|
||||
flatObjectMetadata,
|
||||
},
|
||||
|
||||
+1
@@ -54,6 +54,7 @@ export const getDefaultFlatFieldMetadata = ({
|
||||
updatedAt: createdAt,
|
||||
isUIReadOnly: createFieldInput.isUIReadOnly ?? false,
|
||||
morphId: null,
|
||||
applicationId: null,
|
||||
viewFilterIds: [],
|
||||
viewGroupIds: [],
|
||||
} as const satisfies FlatFieldMetadata;
|
||||
|
||||
+1
@@ -71,6 +71,7 @@ export const recomputeViewGroupsOnEnumFlatFieldMetadataIsNullableUpdate = ({
|
||||
updatedAt: createdAt,
|
||||
deletedAt: null,
|
||||
viewId,
|
||||
applicationId: toFlatFieldMetadata.applicationId,
|
||||
});
|
||||
} else if (isDefined(emptyValueFlatViewGroup)) {
|
||||
sideEffectResult.flatViewGroupsToDelete.push(emptyValueFlatViewGroup);
|
||||
|
||||
+1
@@ -109,6 +109,7 @@ export const recomputeViewGroupsOnFlatFieldMetadataOptionsUpdate = ({
|
||||
isVisible: true,
|
||||
fieldValue: option.value,
|
||||
position: viewGroupHighestPosition + createdOptionIndex + 1,
|
||||
applicationId: fromFlatFieldMetadata.applicationId,
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user