Prevent applying already applied metadata migrations again
The "appliedMigrationId" was converted to it's index of the "METADATA_MIGRATIONS" and then was compared to the "migration id" which starts at 1 instead of 0
This commit is contained in:
@@ -308,7 +308,7 @@ export const applyMetadataMigrations = (
|
|||||||
const migrationIdKey = getMetadataKey('migration');
|
const migrationIdKey = getMetadataKey('migration');
|
||||||
const appliedMigrationId = Number.isNaN(Number(meta[migrationIdKey]))
|
const appliedMigrationId = Number.isNaN(Number(meta[migrationIdKey]))
|
||||||
? 0
|
? 0
|
||||||
: Math.max(0, Number(meta[migrationIdKey]) - 1);
|
: Math.max(0, Number(meta[migrationIdKey]));
|
||||||
|
|
||||||
const migrationToMetadata: [number, Metadata][] = [[0, meta]];
|
const migrationToMetadata: [number, Metadata][] = [[0, meta]];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user