Skip to content

Commit

Permalink
fix(migrator): fix migrator version
Browse files Browse the repository at this point in the history
  • Loading branch information
Su-Yong committed Nov 5, 2024
1 parent 003036b commit f33ec35
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type LEGACY_Config0_24_0 = {
export type LEGACY_Config0_23_2 = {
version: 3,
views: {
enabled: boolean;
Expand Down
2 changes: 1 addition & 1 deletion common/schema/legacy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export * from './before-0.16.0';
export * from './before-0.18.0';
export * from './before-0.20.0';
export * from './before-0.22.0';
export * from './before-0.24.0';
export * from './before-0.23.2';
4 changes: 2 additions & 2 deletions src/config/migration/version/before-0.22.0.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Migrator } from '../types';
import { Config, LEGACY_Config0_22_0 } from '../../../../common/schema';
import { LEGACY_Config0_22_0, LEGACY_Config0_23_2 } from '../../../../common/schema';
import { DEFAULT_CONFIG } from '../../../../common/constants';

export const LEGACY_migrator0_22_0: Migrator = {
Expand All @@ -11,6 +11,6 @@ export const LEGACY_migrator0_22_0: Migrator = {
version: 3,
sourceProvider: configData.playingProvider,
providers: DEFAULT_CONFIG.providers,
} satisfies Config;
} satisfies LEGACY_Config0_23_2;
},
};
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Migrator } from '../types';
import { Config, LEGACY_Config0_24_0 } from '../../../../common/schema';
import { Config, LEGACY_Config0_23_2 } from '../../../../common/schema';

export const LEGACY_migrator0_24_0: Migrator = {
export const LEGACY_migrator0_23_2: Migrator = {
config: (data: unknown) => {
const configData = data as LEGACY_Config0_24_0 ?? {};
const configData = data as LEGACY_Config0_23_2 ?? {};

return {
...configData,
Expand Down
4 changes: 2 additions & 2 deletions src/config/migration/version/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { LEGACY_migrator0_16_0 } from './before-0.16.0';
import { LEGACY_migrator0_18_0 } from './before-0.18.0';
import { LEGACY_migrator0_20_0 } from './before-0.20.0';
import { LEGACY_migrator0_22_0 } from './before-0.22.0';
import { LEGACY_migrator0_24_0 } from './before-0.24.0';
import { LEGACY_migrator0_23_2 } from './before-0.23.2';

import type { MigrateTable } from '../types';

Expand All @@ -11,6 +11,6 @@ export const migrateTable: MigrateTable = {
'>=0.18.0': LEGACY_migrator0_18_0,
'>=0.20.0': LEGACY_migrator0_20_0,
'>=0.22.0': LEGACY_migrator0_22_0,
'>=0.24.0': LEGACY_migrator0_24_0,
'>=0.23.2': LEGACY_migrator0_23_2,
};

0 comments on commit f33ec35

Please sign in to comment.