From 96d56f8883e446ebba0126dc259bccdf903450f6 Mon Sep 17 00:00:00 2001 From: Weiko Date: Tue, 10 Dec 2024 16:33:52 +0100 Subject: [PATCH] Fix removeBillingFKWithCore migration location (#9006) removeBillingFKWithCore migration is in the wrong folder and is not executed as intended. Moving to billing folder to fix that and to be only run in billing mode --- .../{ => billing}/1733753649142-removeBillingFKWithCore.ts | 0 .../workspace/services/workspace.service.spec.ts | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-) rename packages/twenty-server/src/database/typeorm/core/migrations/{ => billing}/1733753649142-removeBillingFKWithCore.ts (100%) diff --git a/packages/twenty-server/src/database/typeorm/core/migrations/1733753649142-removeBillingFKWithCore.ts b/packages/twenty-server/src/database/typeorm/core/migrations/billing/1733753649142-removeBillingFKWithCore.ts similarity index 100% rename from packages/twenty-server/src/database/typeorm/core/migrations/1733753649142-removeBillingFKWithCore.ts rename to packages/twenty-server/src/database/typeorm/core/migrations/billing/1733753649142-removeBillingFKWithCore.ts diff --git a/packages/twenty-server/src/engine/core-modules/workspace/services/workspace.service.spec.ts b/packages/twenty-server/src/engine/core-modules/workspace/services/workspace.service.spec.ts index 6a3d15c8f..18e0f3a10 100644 --- a/packages/twenty-server/src/engine/core-modules/workspace/services/workspace.service.spec.ts +++ b/packages/twenty-server/src/engine/core-modules/workspace/services/workspace.service.spec.ts @@ -2,6 +2,8 @@ import { Test, TestingModule } from '@nestjs/testing'; import { getRepositoryToken } from '@nestjs/typeorm'; import { BillingSubscriptionService } from 'src/engine/core-modules/billing/services/billing-subscription.service'; +import { BillingService } from 'src/engine/core-modules/billing/services/billing.service'; +import { DomainManagerService } from 'src/engine/core-modules/domain-manager/service/domain-manager.service'; import { EmailService } from 'src/engine/core-modules/email/email.service'; import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service'; @@ -13,7 +15,6 @@ import { User } from 'src/engine/core-modules/user/user.entity'; import { WorkspaceInvitationService } from 'src/engine/core-modules/workspace-invitation/services/workspace-invitation.service'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { WorkspaceManagerService } from 'src/engine/workspace-manager/workspace-manager.service'; -import { DomainManagerService } from 'src/engine/core-modules/domain-manager/service/domain-manager.service'; import { WorkspaceService } from './workspace.service'; @@ -56,6 +57,10 @@ describe('WorkspaceService', () => { provide: BillingSubscriptionService, useValue: {}, }, + { + provide: BillingService, + useValue: {}, + }, { provide: EnvironmentService, useValue: {},