Add command to update createdBySource enum values (#11280)
Fixes webhook create workflowRun by WEBHOOK error Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com>
This commit is contained in:
@ -20,6 +20,7 @@ import { EnvironmentService } from 'src/engine/core-modules/environment/environm
|
||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||
import { TwentyORMGlobalManager } from 'src/engine/twenty-orm/twenty-orm-global.manager';
|
||||
import { SyncWorkspaceMetadataCommand } from 'src/engine/workspace-manager/workspace-sync-metadata/commands/sync-workspace-metadata.command';
|
||||
import { UpgradeCreatedByEnumCommand } from 'src/database/commands/upgrade-version-command/0-51/0-51-update-workflow-trigger-type-enum.command';
|
||||
|
||||
type VersionCommands = {
|
||||
beforeSyncMetadata: ActiveOrSuspendedWorkspacesMigrationCommandRunner[];
|
||||
@ -50,6 +51,9 @@ export class UpgradeCommand extends UpgradeCommandRunner {
|
||||
// 0.44 Commands
|
||||
protected readonly initializePermissionsCommand: InitializePermissionsCommand,
|
||||
protected readonly updateViewAggregateOperationsCommand: UpdateViewAggregateOperationsCommand,
|
||||
|
||||
// 0.51 Commands
|
||||
protected readonly upgradeCreatedByEnumCommand: UpgradeCreatedByEnumCommand,
|
||||
) {
|
||||
super(
|
||||
workspaceRepository,
|
||||
@ -77,12 +81,18 @@ export class UpgradeCommand extends UpgradeCommandRunner {
|
||||
],
|
||||
afterSyncMetadata: [],
|
||||
};
|
||||
const commands_050: VersionCommands = {
|
||||
|
||||
const _commands_050: VersionCommands = {
|
||||
beforeSyncMetadata: [],
|
||||
afterSyncMetadata: [],
|
||||
};
|
||||
|
||||
this.commands = commands_050;
|
||||
const commands_051: VersionCommands = {
|
||||
beforeSyncMetadata: [this.upgradeCreatedByEnumCommand],
|
||||
afterSyncMetadata: [],
|
||||
};
|
||||
|
||||
this.commands = commands_051;
|
||||
}
|
||||
|
||||
override async runBeforeSyncMetadata(args: RunOnWorkspaceArgs) {
|
||||
|
||||
Reference in New Issue
Block a user