Fix workspace relation sync (#11963)
## Context While deploying the IS_NEW_RELATION_ENABLED (we don't compute relation based on relationMetadata anymore) to existing workspace, I've tested to run a sync-metadata post feature flag activation. This has raised two issues: - the workspaceMigration generator (which is over-complex and should be refactored later) for fieldMetadata of type RELATION was not handling settings update properly ; - we need to delete existing fieldMetadata corresponding to the UUID foreignKey as they are not needed anymore. This is handled as a 0.53 upgrade command as 0.53 will also come with the full removal of the old relation system --------- Co-authored-by: Etienne <45695613+etiennejouan@users.noreply.github.com> Co-authored-by: prastoin <paul@twenty.com>
This commit is contained in:
@ -35,7 +35,7 @@ export async function determineSchemaRelationDetails(
|
||||
objectMetadataMaps.byId[fieldMetadata.relationTargetObjectMetadataId];
|
||||
|
||||
if (!sourceObjectMetadata || !targetObjectMetadata) {
|
||||
throw new Error('Object metadata not found');
|
||||
throw new Error(`Object metadata not found for field ${fieldMetadata.id}`);
|
||||
}
|
||||
|
||||
if (!fieldMetadata.relationTargetFieldMetadataId) {
|
||||
|
||||
Reference in New Issue
Block a user