From e7ba1c82b492b14eeedfd8708393c9235bbf82d7 Mon Sep 17 00:00:00 2001 From: Guillim Date: Thu, 23 Jan 2025 12:22:03 +0100 Subject: [PATCH] isMicrosoftAuthEnabled = true (#9812) --- ...e-entity-default-microsoft-auth-enabled.ts | 19 +++++++++++++++++++ .../workspace/workspace.entity.ts | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 packages/twenty-server/src/database/typeorm/core/migrations/common/1737630672873-workspace-entity-default-microsoft-auth-enabled.ts diff --git a/packages/twenty-server/src/database/typeorm/core/migrations/common/1737630672873-workspace-entity-default-microsoft-auth-enabled.ts b/packages/twenty-server/src/database/typeorm/core/migrations/common/1737630672873-workspace-entity-default-microsoft-auth-enabled.ts new file mode 100644 index 000000000..84ef81e60 --- /dev/null +++ b/packages/twenty-server/src/database/typeorm/core/migrations/common/1737630672873-workspace-entity-default-microsoft-auth-enabled.ts @@ -0,0 +1,19 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class WorkspaceEntityDefaultMicrosoftAuthEnabled1737630672873 + implements MigrationInterface +{ + name = 'WorkspaceEntityDefaultMicrosoftAuthEnabled1737630672873'; + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "core"."workspace" ALTER COLUMN "isMicrosoftAuthEnabled" SET DEFAULT true`, + ); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "core"."workspace" ALTER COLUMN "isMicrosoftAuthEnabled" SET DEFAULT false`, + ); + } +} diff --git a/packages/twenty-server/src/engine/core-modules/workspace/workspace.entity.ts b/packages/twenty-server/src/engine/core-modules/workspace/workspace.entity.ts index ee93babfe..be5f996bd 100644 --- a/packages/twenty-server/src/engine/core-modules/workspace/workspace.entity.ts +++ b/packages/twenty-server/src/engine/core-modules/workspace/workspace.entity.ts @@ -135,6 +135,6 @@ export class Workspace { isPasswordAuthEnabled: boolean; @Field() - @Column({ default: false }) + @Column({ default: true }) isMicrosoftAuthEnabled: boolean; }