mirror of
https://github.com/Retropex/knots-startos.git
synced 2025-05-12 19:30:45 +02:00
commit
789d493faf
@ -1,4 +1,4 @@
|
||||
import { compat, types as T } from "../dependencies.ts";
|
||||
import { compat, matches, types as T } from "../dependencies.ts";
|
||||
|
||||
export const migration: T.ExpectedExports.migration =
|
||||
compat.migrations.fromMapping(
|
||||
@ -15,6 +15,33 @@ export const migration: T.ExpectedExports.migration =
|
||||
{ version: "27.1.0", type: "down" }
|
||||
),
|
||||
},
|
||||
"28.1.0.1": {
|
||||
up: compat.migrations.updateConfig(
|
||||
(config) => {
|
||||
if (
|
||||
!matches
|
||||
.shape({
|
||||
advanced: matches.shape({
|
||||
blocknotify: matches.any,
|
||||
}),
|
||||
})
|
||||
.test(config)
|
||||
) {
|
||||
throw new Error("Upgrading from Core to Knots is prohibited.");
|
||||
}
|
||||
return config;
|
||||
},
|
||||
true,
|
||||
{
|
||||
version: "28.1.0.1",
|
||||
type: "up",
|
||||
}
|
||||
),
|
||||
down: compat.migrations.updateConfig((config: any) => config, true, {
|
||||
version: "28.1.0.1",
|
||||
type: "down",
|
||||
}),
|
||||
},
|
||||
},
|
||||
"27.1.0"
|
||||
"28.1.0.1"
|
||||
);
|
Loading…
Reference in New Issue
Block a user