Add standard company table migrations (#2484)
This commit is contained in:
@ -62,12 +62,6 @@ export const addCompanyTable: TenantMigrationTableAction[] = [
|
||||
columnType: 'uuid',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'accountOwnerId',
|
||||
referencedTableName: 'workspaceMember',
|
||||
referencedTableColumnName: 'id',
|
||||
action: TenantMigrationColumnActionType.RELATION,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
import {
|
||||
TenantMigrationColumnActionType,
|
||||
TenantMigrationTableAction,
|
||||
} from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addActivityTargetTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
@ -8,6 +11,12 @@ export const addActivityTargetTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'activityTarget',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
columns: [
|
||||
{
|
||||
columnName: 'companyId',
|
||||
columnType: 'uuid',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
import {
|
||||
TenantMigrationColumnActionType,
|
||||
TenantMigrationTableAction,
|
||||
} from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addAttachmentTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
@ -8,6 +11,12 @@ export const addAttachmentTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'attachment',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
columns: [
|
||||
{
|
||||
columnName: 'companyId',
|
||||
columnType: 'uuid',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
import {
|
||||
TenantMigrationColumnActionType,
|
||||
TenantMigrationTableAction,
|
||||
} from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addFavoriteTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
@ -8,6 +11,12 @@ export const addFavoriteTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'favorite',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
columns: [
|
||||
{
|
||||
columnName: 'companyId',
|
||||
columnType: 'uuid',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
import {
|
||||
TenantMigrationColumnActionType,
|
||||
TenantMigrationTableAction,
|
||||
} from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addOpportunityTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
@ -8,6 +11,12 @@ export const addOpportunityTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'opportunity',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
columns: [
|
||||
{
|
||||
columnName: 'companyId',
|
||||
columnType: 'uuid',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
import {
|
||||
TenantMigrationColumnActionType,
|
||||
TenantMigrationTableAction,
|
||||
} from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addPersonTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
@ -8,6 +11,12 @@ export const addPersonTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'person',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
columns: [
|
||||
{
|
||||
columnName: 'companyId',
|
||||
columnType: 'uuid',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
import {
|
||||
TenantMigrationColumnActionType,
|
||||
TenantMigrationTableAction,
|
||||
} from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addCompanyRelations: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'company',
|
||||
action: 'alter',
|
||||
columns: [
|
||||
{
|
||||
columnName: 'accountOwnerId',
|
||||
referencedTableName: 'workspaceMember',
|
||||
referencedTableColumnName: 'id',
|
||||
action: TenantMigrationColumnActionType.RELATION,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,19 @@
|
||||
import {
|
||||
TenantMigrationColumnActionType,
|
||||
TenantMigrationTableAction,
|
||||
} from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addAttachmentRelations: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'attachment',
|
||||
action: 'alter',
|
||||
columns: [
|
||||
{
|
||||
columnName: 'companyId',
|
||||
referencedTableName: 'company',
|
||||
referencedTableColumnName: 'id',
|
||||
action: TenantMigrationColumnActionType.RELATION,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,19 @@
|
||||
import {
|
||||
TenantMigrationColumnActionType,
|
||||
TenantMigrationTableAction,
|
||||
} from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addPersonRelations: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'person',
|
||||
action: 'alter',
|
||||
columns: [
|
||||
{
|
||||
columnName: 'companyId',
|
||||
referencedTableName: 'company',
|
||||
referencedTableColumnName: 'id',
|
||||
action: TenantMigrationColumnActionType.RELATION,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,19 @@
|
||||
import {
|
||||
TenantMigrationColumnActionType,
|
||||
TenantMigrationTableAction,
|
||||
} from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addFavoriteRelations: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'favorite',
|
||||
action: 'alter',
|
||||
columns: [
|
||||
{
|
||||
columnName: 'companyId',
|
||||
referencedTableName: 'company',
|
||||
referencedTableColumnName: 'id',
|
||||
action: TenantMigrationColumnActionType.RELATION,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,19 @@
|
||||
import {
|
||||
TenantMigrationColumnActionType,
|
||||
TenantMigrationTableAction,
|
||||
} from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addOpportunitiesRelations: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'opportunity',
|
||||
action: 'alter',
|
||||
columns: [
|
||||
{
|
||||
columnName: 'companyId',
|
||||
referencedTableName: 'company',
|
||||
referencedTableColumnName: 'id',
|
||||
action: TenantMigrationColumnActionType.RELATION,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,19 @@
|
||||
import {
|
||||
TenantMigrationColumnActionType,
|
||||
TenantMigrationTableAction,
|
||||
} from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addActivityTargetRelations: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'activityTarget',
|
||||
action: 'alter',
|
||||
columns: [
|
||||
{
|
||||
columnName: 'companyId',
|
||||
referencedTableName: 'company',
|
||||
referencedTableColumnName: 'id',
|
||||
action: TenantMigrationColumnActionType.RELATION,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user