diff --git a/lib/utils/migration-utils.js b/lib/utils/migration-utils.js --- a/lib/utils/migration-utils.js +++ b/lib/utils/migration-utils.js @@ -190,7 +190,6 @@ export type MigrationResult = { +state: T, +ops: StoreOperations, - +changesSchema?: boolean, }; export type MigrationFunction< @@ -266,7 +265,6 @@ handleException?: (error: Error, state: T) => T, ): Promise<{ +state: PersistedState, - +schemaChanged: boolean, }> { const migrationKeys = [ ...Object.keys(legacyMigrations), @@ -281,7 +279,6 @@ } let migratedState = state; - let schemaChanged = false; for (const versionKey of sortedMigrationKeys) { if (debug) { console.log( @@ -297,12 +294,8 @@ if (legacyMigrations[versionKey]) { migratedState = await legacyMigrations[versionKey](migratedState); } else { - const { - state: newState, - ops, - changesSchema, - } = await migrations[versionKey](migratedState); - schemaChanged = schemaChanged || !!changesSchema; + const { state: newState, ops } = + await migrations[versionKey](migratedState); migratedState = newState; const versionUpdateOp = { type: 'replace_synced_metadata_entry', @@ -327,14 +320,13 @@ if (handleException) { return { state: handleException(exception, state), - schemaChanged, }; } throw exception; } } - return { state: migratedState, schemaChanged }; + return { state: migratedState }; } export {