Skip to content

Commit

Permalink
Preparing for migrations (#87)
Browse files Browse the repository at this point in the history
* Add new migration

* Update billing column tenant

* Rm migration
  • Loading branch information
Sergey-weber authored Mar 12, 2024
1 parent d7dc73d commit 554deab
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion api/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
7 changes: 0 additions & 7 deletions src/db/models/new/tenant/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {Model} from '../../..';
import {BillingRate} from './types';

export const TenantColumn = {
TenantId: 'tenantId',
Expand All @@ -11,8 +10,6 @@ export const TenantColumn = {
RetriesCount: 'retriesCount',
FoldersEnabled: 'foldersEnabled',
CollectionsEnabled: 'collectionsEnabled',
BillingRate: 'billingRate',
BillingAccountId: 'billingAccountId',
BillingInstanceServiceId: 'billingInstanceServiceId',
BillingStartedAt: 'billingStartedAt',
Branding: 'branding',
Expand All @@ -36,11 +33,7 @@ export class Tenant extends Model {
[TenantColumn.RetriesCount]!: number;
[TenantColumn.FoldersEnabled]!: boolean;
[TenantColumn.CollectionsEnabled]!: boolean;
[TenantColumn.BillingRate]!: BillingRate;
[TenantColumn.BillingAccountId]!: Nullable<string>;
[TenantColumn.BillingInstanceServiceId]!: Nullable<string>;
[TenantColumn.BillingStartedAt]!: Nullable<string>;
[TenantColumn.Branding]!: Record<string, unknown>;
}

export {BillingRate};
4 changes: 0 additions & 4 deletions src/db/models/new/tenant/types.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/db/presentations/joined-migration-tenant/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ const selectedTenantColumns = [
TenantColumn.RetriesCount,
TenantColumn.CollectionsEnabled,
TenantColumn.FoldersEnabled,
TenantColumn.BillingRate,
TenantColumn.BillingAccountId,
TenantColumn.BillingInstanceServiceId,
TenantColumn.BillingStartedAt,
TenantColumn.Branding,
Expand All @@ -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,
Expand Down

0 comments on commit 554deab

Please sign in to comment.