From a15128df36f84e2c43deedbdc70e7efa024ebbad Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Sun, 11 Feb 2024 10:23:37 +0100 Subject: [PATCH] Remove virtual fieldType Relation from fieldMetadata sync --- .../factories/workspace-migration-field.factory.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/twenty-server/src/workspace/workspace-migration-builder/factories/workspace-migration-field.factory.ts b/packages/twenty-server/src/workspace/workspace-migration-builder/factories/workspace-migration-field.factory.ts index 0ede35e4b..bb16d7a54 100644 --- a/packages/twenty-server/src/workspace/workspace-migration-builder/factories/workspace-migration-field.factory.ts +++ b/packages/twenty-server/src/workspace/workspace-migration-builder/factories/workspace-migration-field.factory.ts @@ -85,6 +85,10 @@ export class WorkspaceMigrationFieldFactory { const workspaceMigrations: Partial[] = []; for (const fieldMetadata of fieldMetadataCollection) { + if (fieldMetadata.type === FieldMetadataType.RELATION) { + continue; + } + const migrations: WorkspaceMigrationTableAction[] = [ { name: computeObjectTargetTable( @@ -116,6 +120,10 @@ export class WorkspaceMigrationFieldFactory { const workspaceMigrations: Partial[] = []; for (const fieldMetadataUpdate of fieldMetadataUpdateCollection) { + if (fieldMetadataUpdate.altered.type === FieldMetadataType.RELATION) { + continue; + } + const migrations: WorkspaceMigrationTableAction[] = [ { name: computeObjectTargetTable(