diff --git a/packages/twenty-server/src/database/typeorm/core/migrations/common/1734544295083-remove-default-workspace-id.ts b/packages/twenty-server/src/database/typeorm/core/migrations/common/1734544295083-remove-default-workspace-id.ts index 838c99c34e66..f78c8e6afc1c 100644 --- a/packages/twenty-server/src/database/typeorm/core/migrations/common/1734544295083-remove-default-workspace-id.ts +++ b/packages/twenty-server/src/database/typeorm/core/migrations/common/1734544295083-remove-default-workspace-id.ts @@ -12,15 +12,9 @@ export class RemoveDefaultWorkspaceId1734544295083 await queryRunner.query( `ALTER TABLE "core"."user" DROP COLUMN "defaultWorkspaceId"`, ); - await queryRunner.query( - `ALTER TABLE "core"."workspace" DROP CONSTRAINT "UQ_e6fa363bdaf45cbf8ce97bcebf0"`, - ); } public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query( - `ALTER TABLE "core"."workspace" ADD CONSTRAINT "UQ_e6fa363bdaf45cbf8ce97bcebf0" UNIQUE ("domainName")`, - ); await queryRunner.query( `ALTER TABLE "core"."user" ADD "defaultWorkspaceId" uuid NOT NULL`, ); 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 1986e8f6beb2..ccd8b22a18dd 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 @@ -21,6 +21,9 @@ import { KeyValuePair } from 'src/engine/core-modules/key-value-pair/key-value-p import { PostgresCredentials } from 'src/engine/core-modules/postgres-credentials/postgres-credentials.entity'; import { WorkspaceSSOIdentityProvider } from 'src/engine/core-modules/sso/workspace-sso-identity-provider.entity'; import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity'; +// This line is necessary to avoid a circular dependency issue. Need to deep dive +// eslint-disable-next-line +import { User } from 'src/engine/core-modules/user/user.entity'; export enum WorkspaceActivationStatus { ONGOING_CREATION = 'ONGOING_CREATION',