Move backfill page layout to 1.23 (#19670)
This commit is contained in:
-4
@@ -1,26 +1,22 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { WorkspaceIteratorModule } from 'src/database/commands/command-runners/workspace-iterator.module';
|
||||
import { BackfillPageLayoutsAndFieldsWidgetViewFieldsCommand } from 'src/database/commands/upgrade-version-command/1-22/1-22-workspace-command-1780000001000-backfill-page-layouts-and-fields-widget-view-fields.command';
|
||||
import { BackfillStandardSkillsCommand } from 'src/database/commands/upgrade-version-command/1-22/1-22-workspace-command-1780000002000-backfill-standard-skills.command';
|
||||
import { FixMergeCommandSelectAllCommand } from 'src/database/commands/upgrade-version-command/1-22/1-22-workspace-command-1780000003000-fix-merge-command-select-all.command';
|
||||
import { AddSendEmailRecordSelectionCommandMenuItemsCommand } from 'src/database/commands/upgrade-version-command/1-22/1-22-workspace-command-1775500016000-add-send-email-record-selection-command-menu-items.command';
|
||||
import { ApplicationModule } from 'src/engine/core-modules/application/application.module';
|
||||
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
||||
import { WorkspaceCacheModule } from 'src/engine/workspace-cache/workspace-cache.module';
|
||||
import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace-migration/workspace-migration.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
ApplicationModule,
|
||||
FeatureFlagModule,
|
||||
WorkspaceCacheModule,
|
||||
WorkspaceIteratorModule,
|
||||
WorkspaceMigrationModule,
|
||||
],
|
||||
providers: [
|
||||
AddSendEmailRecordSelectionCommandMenuItemsCommand,
|
||||
BackfillPageLayoutsAndFieldsWidgetViewFieldsCommand,
|
||||
BackfillStandardSkillsCommand,
|
||||
FixMergeCommandSelectAllCommand,
|
||||
],
|
||||
|
||||
+17
-1
@@ -1,4 +1,20 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
@Module({})
|
||||
import { WorkspaceIteratorModule } from 'src/database/commands/command-runners/workspace-iterator.module';
|
||||
import { BackfillPageLayoutsAndFieldsWidgetViewFieldsCommand } from 'src/database/commands/upgrade-version-command/1-23/1-23-workspace-command-1780000001000-backfill-page-layouts-and-fields-widget-view-fields.command';
|
||||
import { ApplicationModule } from 'src/engine/core-modules/application/application.module';
|
||||
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
||||
import { WorkspaceCacheModule } from 'src/engine/workspace-cache/workspace-cache.module';
|
||||
import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace-migration/workspace-migration.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
ApplicationModule,
|
||||
FeatureFlagModule,
|
||||
WorkspaceCacheModule,
|
||||
WorkspaceIteratorModule,
|
||||
WorkspaceMigrationModule,
|
||||
],
|
||||
providers: [BackfillPageLayoutsAndFieldsWidgetViewFieldsCommand],
|
||||
})
|
||||
export class V1_23_UpgradeVersionCommandModule {}
|
||||
|
||||
+2
-2
@@ -82,9 +82,9 @@ const isRelationTargetAvailable = (
|
||||
return true;
|
||||
};
|
||||
|
||||
@RegisteredWorkspaceCommand('1.22.0', 1780000001000)
|
||||
@RegisteredWorkspaceCommand('1.23.0', 1780000001000)
|
||||
@Command({
|
||||
name: 'upgrade:1-22:backfill-page-layouts-and-fields-widget-view-fields',
|
||||
name: 'upgrade:1-23:backfill-page-layouts-and-fields-widget-view-fields',
|
||||
description:
|
||||
'Backfill RECORD_PAGE page layouts, sync FIELDS_WIDGET view fields, create FIELD widgets, and enable IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED',
|
||||
})
|
||||
+3
-7
@@ -1,19 +1,15 @@
|
||||
import 'reflect-metadata';
|
||||
|
||||
import { type TwentyCrossUpgradeSupportedVersion } from 'src/engine/core-modules/upgrade/constants/twenty-cross-upgrade-supported-version.constant';
|
||||
import { TwentyAllVersion } from 'src/engine/core-modules/upgrade/constants/twenty-all-versions.constant';
|
||||
|
||||
export type RegisteredWorkspaceCommandMetadata = {
|
||||
version: TwentyCrossUpgradeSupportedVersion;
|
||||
version: TwentyAllVersion;
|
||||
timestamp: number;
|
||||
};
|
||||
|
||||
const REGISTERED_WORKSPACE_COMMAND_KEY = 'REGISTERED_WORKSPACE_COMMAND';
|
||||
|
||||
export const RegisteredWorkspaceCommand =
|
||||
(
|
||||
version: TwentyCrossUpgradeSupportedVersion,
|
||||
timestamp: number,
|
||||
): ClassDecorator =>
|
||||
(version: TwentyAllVersion, timestamp: number): ClassDecorator =>
|
||||
(target) => {
|
||||
Reflect.defineMetadata(
|
||||
REGISTERED_WORKSPACE_COMMAND_KEY,
|
||||
|
||||
Reference in New Issue
Block a user