diff --git a/package.json b/package.json index fff88900..334d04da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minifolio", - "version": "0.3.0", + "version": "0.3.1", "private": true, "license": "GPL-3.0-only", "scripts": { diff --git a/src/lib/server/data/migrations/index.ts b/src/lib/server/data/migrations/index.ts index e8f9eab7..ae57cddc 100644 --- a/src/lib/server/data/migrations/index.ts +++ b/src/lib/server/data/migrations/index.ts @@ -12,10 +12,11 @@ export type MigrationFunction = (dataDir: string) => Promise; const migrations: Record = { '~0.1.0': migrateFromV010, '~0.2.0': migrateFromV020, + '~0.3.0': updateConfigVersions, }; /** Update config versions (only for minor, non-breaking changes to config.json) */ -export async function updateConfigVersions() { +export async function updateConfigVersions(dataDir: string) { const config = await getConfig(); config.version = version; await setConfig(config); @@ -38,7 +39,9 @@ export default async function migrate(oldVersion: string) { // calls getConfig and getLocalConfig without specifying the desired // directory to load from). try { - return await migrateFunction(getDataDir()); + await migrateFunction(getDataDir()); + console.log('Migration success'); + return; } catch (e) { console.log('!!! Error during migration'); console.log(e); diff --git a/src/lib/server/data/migrations/v0.2.0.ts b/src/lib/server/data/migrations/v0.2.0.ts index 30305d2c..35c387ac 100644 --- a/src/lib/server/data/migrations/v0.2.0.ts +++ b/src/lib/server/data/migrations/v0.2.0.ts @@ -12,7 +12,7 @@ import { unsafeLoadGroupInfo } from './unsafeLoad'; export default async function migrate(dataDir: string) { console.log(`Migrate from v0.2.x -> ${version}`); - await updateConfigVersions(); + await updateConfigVersions(dataDir); // For each group for (const groupId of await listGroups()) {