Skip to content

The open alternative to Salesforce, designed for AI.

Fix sync metadata default value not being synced (#9163)

Weiko779c5033818d
diff --git a/packages/twenty-server/src/database/commands/upgrade-version/0-40/0-40-record-position-backfill.command.ts b/packages/twenty-server/src/database/commands/upgrade-version/0-40/0-40-record-position-backfill.command.ts
index b889c904cd1..53c26618d3d 100644
--- a/packages/twenty-server/src/database/commands/upgrade-version/0-40/0-40-record-position-backfill.command.ts
+++ b/packages/twenty-server/src/database/commands/upgrade-version/0-40/0-40-record-position-backfill.command.ts
@@ -9,7 +9,7 @@ import { RecordPositionBackfillService } from 'src/engine/api/graphql/workspace-
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
@Command({
- name: 'migrate-0.40:backfill-record-position',
+ name: 'upgrade-0.40:record-position-backfill',
description: 'Backfill record position',
})
export class RecordPositionBackfillCommand extends ActiveWorkspacesCommandRunner {
diff --git a/packages/twenty-server/src/database/commands/upgrade-version/0-40/0-40-upgrade-version.command.ts b/packages/twenty-server/src/database/commands/upgrade-version/0-40/0-40-upgrade-version.command.ts
index f0063834a52..e60b537bb39 100644
--- a/packages/twenty-server/src/database/commands/upgrade-version/0-40/0-40-upgrade-version.command.ts
+++ b/packages/twenty-server/src/database/commands/upgrade-version/0-40/0-40-upgrade-version.command.ts
@@ -38,19 +38,19 @@ export class UpgradeTo0_40Command extends ActiveWorkspacesCommandRunner {
'Running command to upgrade to 0.40: must start with phone calling code otherwise SyncMetadata will fail',
);
- await this.phoneCallingCodeCreateColumnCommand.executeActiveWorkspacesCommand(
+ await this.recordPositionBackfillCommand.executeActiveWorkspacesCommand(
passedParam,
options,
workspaceIds,
);
- await this.phoneCallingCodeMigrateDataCommand.executeActiveWorkspacesCommand(
+ await this.phoneCallingCodeCreateColumnCommand.executeActiveWorkspacesCommand(
passedParam,
options,
workspaceIds,
);
- await this.recordPositionBackfillCommand.executeActiveWorkspacesCommand(
+ await this.phoneCallingCodeMigrateDataCommand.executeActiveWorkspacesCommand(
passedParam,
options,
workspaceIds,
diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/comparators/workspace-field.comparator.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/comparators/workspace-field.comparator.ts
index edc92cd3909..863a1249682 100644
--- a/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/comparators/workspace-field.comparator.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/comparators/workspace-field.comparator.ts
@@ -26,7 +26,6 @@ const commonFieldPropertiesToIgnore = [
'gate',
'asExpression',
'generatedType',
- 'defaultValue',
'isLabelSyncedWithName',
];