Skip to content

The open alternative to Salesforce, designed for AI.

Fix workspace-sync when alter with relation (#3721)

Weiko82d99afe2f3f
diff --git a/packages/twenty-server/src/workspace/workspace-sync-metadata/factories/workspace-sync.factory.ts b/packages/twenty-server/src/workspace/workspace-sync-metadata/factories/workspace-sync.factory.ts
index 3c893571a1a..8a46950a293 100644
--- a/packages/twenty-server/src/workspace/workspace-sync-metadata/factories/workspace-sync.factory.ts
+++ b/packages/twenty-server/src/workspace/workspace-sync-metadata/factories/workspace-sync.factory.ts
@@ -106,6 +106,10 @@ export class WorkspaceSyncFactory {
if (createdFieldMetadataCollection.length > 0) {
for (const fieldMetadata of createdFieldMetadataCollection) {
+ if (fieldMetadata.type === FieldMetadataType.RELATION) {
+ continue;
+ }
+
const migrations = [
{
name: computeObjectTargetTable(