Migrate messageFolder parentFolderId from UUID to externalId (#19348)
This PR migrates `messageFolder`.`parentFolderId` from an internal `UUID` reference to external provider id. Eliminates unnecessary lookup and complexity --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
+3
@@ -37,6 +37,7 @@ import { CoreEngineVersionService } from 'src/engine/core-engine-version/service
|
||||
import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||
import { WorkspaceVersionService } from 'src/engine/workspace-manager/workspace-version/services/workspace-version.service';
|
||||
import { DropWorkspaceMessagingFksCommand } from 'src/database/commands/upgrade-version-command/1-21/1-21-drop-workspace-messaging-fks.command';
|
||||
import { MigrateMessageFolderParentIdToExternalIdCommand } from 'src/database/commands/upgrade-version-command/1-21/1-21-migrate-message-folder-parent-id-to-external-id.command';
|
||||
|
||||
@Command({
|
||||
name: 'upgrade',
|
||||
@@ -80,6 +81,7 @@ export class UpgradeCommand extends UpgradeCommandRunner {
|
||||
private readonly migrateAiAgentTextToJsonResponseFormatCommand: MigrateAiAgentTextToJsonResponseFormatCommand,
|
||||
private readonly updateEditLayoutCommandMenuItemLabelCommand: UpdateEditLayoutCommandMenuItemLabelCommand,
|
||||
private readonly dropWorkspaceMessagingFksCommand: DropWorkspaceMessagingFksCommand,
|
||||
private readonly migrateMessageFolderParentIdToExternalIdCommand: MigrateMessageFolderParentIdToExternalIdCommand,
|
||||
) {
|
||||
super(
|
||||
workspaceRepository,
|
||||
@@ -120,6 +122,7 @@ export class UpgradeCommand extends UpgradeCommandRunner {
|
||||
this.migrateAiAgentTextToJsonResponseFormatCommand,
|
||||
this.updateEditLayoutCommandMenuItemLabelCommand,
|
||||
this.dropWorkspaceMessagingFksCommand,
|
||||
this.migrateMessageFolderParentIdToExternalIdCommand,
|
||||
];
|
||||
|
||||
this.allCommands = {
|
||||
|
||||
Reference in New Issue
Block a user