Migrate standard objects (#2439)
* Migrate standard objects * Add migrations * fix relation * fix: register RelationMetadataType enum * fix: correctly fix null relation --------- Co-authored-by: corentin <corentin@twenty.com> Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
This commit is contained in:
@ -32,6 +32,42 @@ export const addCompanyTable: TenantMigrationTableAction[] = [
|
||||
columnType: 'integer',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'linkedinUrl_link',
|
||||
columnType: 'varchar',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'linkedinUrl',
|
||||
columnType: 'varchar',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'xUrl',
|
||||
columnType: 'varchar',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'annualRecurringRevenue',
|
||||
columnType: 'float',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'idealCustomerProfile',
|
||||
columnType: 'boolean',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'accountOwnerId',
|
||||
columnType: 'uuid',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'accountOwnerId',
|
||||
referencedTableName: 'workspaceMember',
|
||||
referencedTableColumnName: 'id',
|
||||
action: TenantMigrationColumnActionType.RELATION,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@ -17,11 +17,6 @@ export const addViewFilterTable: TenantMigrationTableAction[] = [
|
||||
columnType: 'varchar',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'viewId',
|
||||
columnType: 'varchar',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'operand',
|
||||
columnType: 'varchar',
|
||||
@ -37,6 +32,17 @@ export const addViewFilterTable: TenantMigrationTableAction[] = [
|
||||
columnType: 'varchar',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'viewId',
|
||||
columnType: 'uuid',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'viewId',
|
||||
referencedTableName: 'view',
|
||||
referencedTableColumnName: 'id',
|
||||
action: TenantMigrationColumnActionType.RELATION,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@ -17,16 +17,22 @@ export const addViewSortTable: TenantMigrationTableAction[] = [
|
||||
columnType: 'varchar',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'viewId',
|
||||
columnType: 'varchar',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'direction',
|
||||
columnType: 'varchar',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'viewId',
|
||||
columnType: 'uuid',
|
||||
action: TenantMigrationColumnActionType.CREATE,
|
||||
},
|
||||
{
|
||||
columnName: 'viewId',
|
||||
referencedTableName: 'view',
|
||||
referencedTableColumnName: 'id',
|
||||
action: TenantMigrationColumnActionType.RELATION,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addActivityTargetTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'activityTarget',
|
||||
action: 'create',
|
||||
},
|
||||
{
|
||||
name: 'activityTarget',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,13 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addActivityTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'activity',
|
||||
action: 'create',
|
||||
},
|
||||
{
|
||||
name: 'activity',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,13 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addApiKeyTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'apiKey',
|
||||
action: 'create',
|
||||
},
|
||||
{
|
||||
name: 'apiKey',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,13 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addAttachmentTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'attachment',
|
||||
action: 'create',
|
||||
},
|
||||
{
|
||||
name: 'attachment',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,13 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addCommentTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'comment',
|
||||
action: 'create',
|
||||
},
|
||||
{
|
||||
name: 'comment',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,13 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addFavoriteTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'favorite',
|
||||
action: 'create',
|
||||
},
|
||||
{
|
||||
name: 'favorite',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,13 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addOpportunityTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'opportunity',
|
||||
action: 'create',
|
||||
},
|
||||
{
|
||||
name: 'opportunity',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,13 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addPersonTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'person',
|
||||
action: 'create',
|
||||
},
|
||||
{
|
||||
name: 'person',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,13 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addPipelineStepTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'pipelineStep',
|
||||
action: 'create',
|
||||
},
|
||||
{
|
||||
name: 'pipelineStep',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,13 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addWebhookTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'webhook',
|
||||
action: 'create',
|
||||
},
|
||||
{
|
||||
name: 'webhook',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,13 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addWorkspaceMemberSettingTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'workspaceMemberSetting',
|
||||
action: 'create',
|
||||
},
|
||||
{
|
||||
name: 'workspaceMemberSetting',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,13 @@
|
||||
import { TenantMigrationTableAction } from 'src/metadata/tenant-migration/tenant-migration.entity';
|
||||
|
||||
export const addWorkspaceMemberTable: TenantMigrationTableAction[] = [
|
||||
{
|
||||
name: 'workspaceMember',
|
||||
action: 'create',
|
||||
},
|
||||
{
|
||||
name: 'workspaceMember',
|
||||
action: 'alter',
|
||||
columns: [],
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user