971 rest api bug sentry on filter parameters (#12088)

- fix missing createBy injection in api createOne and createMany
endpoints
- add a command to fix null default value for createdBySource in
production entities
- tested on `1747159401197/` dump extract of production db without issue
This commit is contained in:
martmull
2025-05-19 12:46:03 +02:00
committed by GitHub
parent 58b40b1f89
commit b52ef76376
20 changed files with 418 additions and 162 deletions

View File

@ -28,6 +28,7 @@ import { TwentyConfigService } from 'src/engine/core-modules/twenty-config/twent
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 { FixCreatedByDefaultValueCommand } from 'src/database/commands/upgrade-version-command/0-54/0-54-created-by-default-value.command';
@Command({
name: 'upgrade',
@ -70,6 +71,7 @@ export class UpgradeCommand extends UpgradeCommandRunner {
// 0.54 Commands
protected readonly fixStandardSelectFieldsPositionCommand: FixStandardSelectFieldsPositionCommand,
protected readonly fixCreatedByDefaultValueCommand: FixCreatedByDefaultValueCommand,
) {
super(
workspaceRepository,
@ -127,7 +129,10 @@ export class UpgradeCommand extends UpgradeCommandRunner {
};
const commands_054: VersionCommands = {
beforeSyncMetadata: [this.fixStandardSelectFieldsPositionCommand],
beforeSyncMetadata: [
this.fixStandardSelectFieldsPositionCommand,
this.fixCreatedByDefaultValueCommand,
],
afterSyncMetadata: [],
};