-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update to upstream 2.0.0 * update to official release and disallow downgrade * cleanup + fixes * remove redundant flag * cleanup * fix migration * fix build * fix build * fix build * fix build * fix build
- Loading branch information
Showing
4 changed files
with
64 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,63 @@ | ||
import { types as T, compat } from "../deps.ts" | ||
import { types as T, compat } from "../deps.ts"; | ||
import { migration_up_1_4_7 } from "../migrations/1_4_7_up_migration.ts"; | ||
import { migration_down_1_4_7 } from "../migrations/1_4_7_down_migration.ts"; | ||
import { migration_up_1_10_3 } from "../migrations/1_10_3_up_migration.ts"; | ||
|
||
export const migration: T.ExpectedExports.migration = async (effects, version, ...args) => { | ||
export const migration: T.ExpectedExports.migration = async ( | ||
effects, | ||
version, | ||
...args | ||
) => { | ||
await effects.createDir({ | ||
path: "start9", | ||
volumeId: "main" | ||
volumeId: "main", | ||
}); | ||
return compat.migrations | ||
.fromMapping( | ||
{ | ||
// 1.1.2.5: initial (updated) version released with eOS 0.3.0 - bitcoin config was internal (proxy) or external | ||
"1.4.7.1": { | ||
up: compat.migrations.updateConfig( | ||
(config) => { | ||
return migration_up_1_4_7(config) | ||
}, | ||
false, | ||
{ version: "1.4.7.1", type: "up" }, | ||
), | ||
down: compat.migrations.updateConfig( | ||
(config) => { | ||
return migration_down_1_4_7(config) | ||
}, | ||
true, | ||
{ version: "1.4.7.1", type: "down" }, | ||
), | ||
}, | ||
// 1.4.7.3: JS config/properties conversion occurred | ||
"1.10.2": { | ||
up: compat.migrations.updateConfig( | ||
(config) => { | ||
return migration_up_1_10_3(config) | ||
}, | ||
true, | ||
{ version: "1.10.2", type: "up"} | ||
), | ||
down: compat.migrations.updateConfig( | ||
(_config) => { | ||
throw new Error( | ||
"Cannot downgrade this version" | ||
) | ||
}, | ||
true, | ||
{ version: "1.10.2", type: "down" }, | ||
), | ||
return compat.migrations.fromMapping( | ||
{ | ||
// 1.1.2.5: initial (updated) version released with eOS 0.3.0 - bitcoin config was internal (proxy) or external | ||
"1.4.7.1": { | ||
up: compat.migrations.updateConfig( | ||
(config) => { | ||
return migration_up_1_4_7(config); | ||
}, | ||
false, | ||
{ version: "1.4.7.1", type: "up" } | ||
), | ||
down: compat.migrations.updateConfig( | ||
(config) => { | ||
return migration_down_1_4_7(config); | ||
}, | ||
true, | ||
{ version: "1.4.7.1", type: "down" } | ||
), | ||
}, | ||
// 1.4.7.3: JS config/properties conversion occurred | ||
"1.10.2": { | ||
up: compat.migrations.updateConfig( | ||
(config) => { | ||
return migration_up_1_10_3(config); | ||
}, | ||
true, | ||
{ version: "1.10.2", type: "up" } | ||
), | ||
down: compat.migrations.updateConfig( | ||
(_config) => { | ||
throw new Error("Cannot downgrade this version"); | ||
}, | ||
true, | ||
{ version: "1.10.2", type: "down" } | ||
), | ||
}, | ||
"2.0.0": { | ||
up: compat.migrations.updateConfig((config) => config, true, { | ||
version: "2.0.0", | ||
type: "up", | ||
}), | ||
down: () => { | ||
throw new Error("Cannot downgrade this version"); | ||
}, | ||
}, | ||
"1.13.5", | ||
)(effects, version, ...args) | ||
} | ||
}, | ||
"2.0.0" | ||
)(effects, version, ...args); | ||
}; |