From 680ed905bc82cf38a2fb691a60aee2ba4de87423 Mon Sep 17 00:00:00 2001 From: Marie Stoppa Date: Wed, 16 Oct 2024 16:36:08 +0200 Subject: [PATCH] set default shouldSync value to false for existing objects --- .../migrations/1728579416430-addShouldSyncLabelAndName.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/twenty-server/src/database/typeorm/metadata/migrations/1728579416430-addShouldSyncLabelAndName.ts b/packages/twenty-server/src/database/typeorm/metadata/migrations/1728579416430-addShouldSyncLabelAndName.ts index adf6692861f3..9fedf507cd65 100644 --- a/packages/twenty-server/src/database/typeorm/metadata/migrations/1728579416430-addShouldSyncLabelAndName.ts +++ b/packages/twenty-server/src/database/typeorm/metadata/migrations/1728579416430-addShouldSyncLabelAndName.ts @@ -7,7 +7,11 @@ export class AddShouldSyncLabelAndName1728579416430 public async up(queryRunner: QueryRunner): Promise { await queryRunner.query( - `ALTER TABLE "metadata"."objectMetadata" ADD "shouldSyncLabelAndName" boolean NOT NULL DEFAULT true`, + `ALTER TABLE "metadata"."objectMetadata" ADD "shouldSyncLabelAndName" boolean NOT NULL DEFAULT false`, + ); + + await queryRunner.query( + `ALTER TABLE "metadata"."objectMetadata" ALTER COLUMN "shouldSyncLabelAndName" SET DEFAULT true`, ); }