From 554deab632f1fd34d86a530bf6cf04b0b4b1d509 Mon Sep 17 00:00:00 2001 From: Sergei Samokhvalov Date: Tue, 12 Mar 2024 10:56:15 +0300 Subject: [PATCH] Preparing for migrations (#87) * Add new migration * Update billing column tenant * Rm migration --- api/db.ts | 2 +- src/db/models/new/tenant/index.ts | 7 ------- src/db/models/new/tenant/types.ts | 4 ---- src/db/presentations/joined-migration-tenant/index.ts | 4 ---- 4 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 src/db/models/new/tenant/types.ts diff --git a/api/db.ts b/api/db.ts index bc34e23e..c9ab0d8b 100644 --- a/api/db.ts +++ b/api/db.ts @@ -15,7 +15,7 @@ export { RevisionModelColumnRaw, } from '../src/db/models/new/revision'; -export {Tenant, TenantColumn, BillingRate} from '../src/db/models/new/tenant'; +export {Tenant, TenantColumn} from '../src/db/models/new/tenant'; export {MigrationTenant, MigrationTenantColumn} from '../src/db/models/new/migration-tenant'; export {WorkbookModel, WorkbookModelColumn} from '../src/db/models/new/workbook'; diff --git a/src/db/models/new/tenant/index.ts b/src/db/models/new/tenant/index.ts index 7e0db233..55e45729 100644 --- a/src/db/models/new/tenant/index.ts +++ b/src/db/models/new/tenant/index.ts @@ -1,5 +1,4 @@ import {Model} from '../../..'; -import {BillingRate} from './types'; export const TenantColumn = { TenantId: 'tenantId', @@ -11,8 +10,6 @@ export const TenantColumn = { RetriesCount: 'retriesCount', FoldersEnabled: 'foldersEnabled', CollectionsEnabled: 'collectionsEnabled', - BillingRate: 'billingRate', - BillingAccountId: 'billingAccountId', BillingInstanceServiceId: 'billingInstanceServiceId', BillingStartedAt: 'billingStartedAt', Branding: 'branding', @@ -36,11 +33,7 @@ export class Tenant extends Model { [TenantColumn.RetriesCount]!: number; [TenantColumn.FoldersEnabled]!: boolean; [TenantColumn.CollectionsEnabled]!: boolean; - [TenantColumn.BillingRate]!: BillingRate; - [TenantColumn.BillingAccountId]!: Nullable; [TenantColumn.BillingInstanceServiceId]!: Nullable; [TenantColumn.BillingStartedAt]!: Nullable; [TenantColumn.Branding]!: Record; } - -export {BillingRate}; diff --git a/src/db/models/new/tenant/types.ts b/src/db/models/new/tenant/types.ts deleted file mode 100644 index e5d00905..00000000 --- a/src/db/models/new/tenant/types.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum BillingRate { - Community = 'community', - Business = 'business', -} diff --git a/src/db/presentations/joined-migration-tenant/index.ts b/src/db/presentations/joined-migration-tenant/index.ts index ed7d4c8d..58e435ce 100644 --- a/src/db/presentations/joined-migration-tenant/index.ts +++ b/src/db/presentations/joined-migration-tenant/index.ts @@ -13,8 +13,6 @@ const selectedTenantColumns = [ TenantColumn.RetriesCount, TenantColumn.CollectionsEnabled, TenantColumn.FoldersEnabled, - TenantColumn.BillingRate, - TenantColumn.BillingAccountId, TenantColumn.BillingInstanceServiceId, TenantColumn.BillingStartedAt, TenantColumn.Branding, @@ -37,8 +35,6 @@ export const JoinedMigrationTenantColumn = { RetriesCount: TenantColumn.RetriesCount, CollectionsEnabled: TenantColumn.CollectionsEnabled, FoldersEnabled: TenantColumn.FoldersEnabled, - BillingRate: TenantColumn.BillingRate, - BillingAccountId: TenantColumn.BillingAccountId, BillingInstanceServiceId: TenantColumn.BillingInstanceServiceId, BillingStartedAt: TenantColumn.BillingStartedAt, FromId: MigrationTenantColumn.FromId,