mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-22 19:41:53 +03:00
refactor(database): remove defaultWorkspaceId and fix imports
Removed the defaultWorkspaceId column and its associated constraints from database migrations. Additionally, added an import in workspace.entity.ts to address circular dependency issues.
This commit is contained in:
parent
97fd18506f
commit
bef51323fb
@ -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<void> {
|
||||
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`,
|
||||
);
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user