From d14e9eb0718bb08ad2eefd4060cbcb78e28b244b Mon Sep 17 00:00:00 2001 From: Weiko Date: Tue, 26 Nov 2024 10:53:17 +0100 Subject: [PATCH] add to global command --- .../upgrade-version/0-33/0-33-upgrade-version.command.ts | 7 +++++++ .../upgrade-version/0-33/0-33-upgrade-version.module.ts | 2 ++ 2 files changed, 9 insertions(+) diff --git a/packages/twenty-server/src/database/commands/upgrade-version/0-33/0-33-upgrade-version.command.ts b/packages/twenty-server/src/database/commands/upgrade-version/0-33/0-33-upgrade-version.command.ts index 972d9a582bad..5fbad5ca8ec9 100644 --- a/packages/twenty-server/src/database/commands/upgrade-version/0-33/0-33-upgrade-version.command.ts +++ b/packages/twenty-server/src/database/commands/upgrade-version/0-33/0-33-upgrade-version.command.ts @@ -6,6 +6,7 @@ import { Repository } from 'typeorm'; import { ActiveWorkspacesCommandRunner } from 'src/database/commands/active-workspaces.command'; import { DeleteViewFieldsWithoutViewsCommand } from 'src/database/commands/upgrade-version/0-33/0-33-delete-view-fields-without-views.command'; import { EnforceUniqueConstraintsCommand } from 'src/database/commands/upgrade-version/0-33/0-33-enforce-unique-constraints.command'; +import { SetMissingLabelIdentifierToCustomObjectsCommand } from 'src/database/commands/upgrade-version/0-33/0-33-set-missing-label-identifier-to-custom-objects.command'; import { UpdateRichTextSearchVectorCommand } from 'src/database/commands/upgrade-version/0-33/0-33-update-rich-text-search-vector-expression'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { SyncWorkspaceMetadataCommand } from 'src/engine/workspace-manager/workspace-sync-metadata/commands/sync-workspace-metadata.command'; @@ -26,6 +27,7 @@ export class UpgradeTo0_33Command extends ActiveWorkspacesCommandRunner { private readonly enforceUniqueConstraintsCommand: EnforceUniqueConstraintsCommand, private readonly deleteViewFieldsWithoutViewsCommand: DeleteViewFieldsWithoutViewsCommand, private readonly syncWorkspaceMetadataCommand: SyncWorkspaceMetadataCommand, + private readonly setMissingLabelIdentifierToCustomObjectsCommand: SetMissingLabelIdentifierToCustomObjectsCommand, ) { super(workspaceRepository); } @@ -64,5 +66,10 @@ export class UpgradeTo0_33Command extends ActiveWorkspacesCommandRunner { options, workspaceIds, ); + await this.setMissingLabelIdentifierToCustomObjectsCommand.executeActiveWorkspacesCommand( + passedParam, + options, + workspaceIds, + ); } } diff --git a/packages/twenty-server/src/database/commands/upgrade-version/0-33/0-33-upgrade-version.module.ts b/packages/twenty-server/src/database/commands/upgrade-version/0-33/0-33-upgrade-version.module.ts index cd7c1f7c2c39..9aa09eb69287 100644 --- a/packages/twenty-server/src/database/commands/upgrade-version/0-33/0-33-upgrade-version.module.ts +++ b/packages/twenty-server/src/database/commands/upgrade-version/0-33/0-33-upgrade-version.module.ts @@ -3,6 +3,7 @@ import { TypeOrmModule } from '@nestjs/typeorm'; import { DeleteViewFieldsWithoutViewsCommand } from 'src/database/commands/upgrade-version/0-33/0-33-delete-view-fields-without-views.command'; import { EnforceUniqueConstraintsCommand } from 'src/database/commands/upgrade-version/0-33/0-33-enforce-unique-constraints.command'; +import { SetMissingLabelIdentifierToCustomObjectsCommand } from 'src/database/commands/upgrade-version/0-33/0-33-set-missing-label-identifier-to-custom-objects.command'; import { UpdateRichTextSearchVectorCommand } from 'src/database/commands/upgrade-version/0-33/0-33-update-rich-text-search-vector-expression'; import { UpgradeTo0_33Command } from 'src/database/commands/upgrade-version/0-33/0-33-upgrade-version.command'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; @@ -28,6 +29,7 @@ import { WorkspaceSyncMetadataCommandsModule } from 'src/engine/workspace-manage UpdateRichTextSearchVectorCommand, EnforceUniqueConstraintsCommand, DeleteViewFieldsWithoutViewsCommand, + SetMissingLabelIdentifierToCustomObjectsCommand, ], }) export class UpgradeTo0_33CommandModule {}