Skip to content

The open alternative to Salesforce, designed for AI.

isMicrosoftAuthEnabled = true (#9812)

Guillime7ba1c82b492
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 00000000000..84ef81e60fa
--- /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<void> {
+ await queryRunner.query(
+ `ALTER TABLE "core"."workspace" ALTER COLUMN "isMicrosoftAuthEnabled" SET DEFAULT true`,
+ );
+ }
+
+ public async down(queryRunner: QueryRunner): Promise<void> {
+ 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 ee93babfe84..be5f996bd74 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;
}