Only commit metadata migration changes of newly applied migration

Changes got commited everytime regardless off if the migration had already been applied
This commit is contained in:
schroda
2025-01-06 01:42:42 +01:00
parent d87fa3721e
commit 724319b6c5

View File

@@ -268,7 +268,7 @@ const commitMigratedMetadata = (
!metadata || Number(metadata[getMetadataKey('migration')]) === METADATA_MIGRATIONS.length;
const isCommitRequired =
!isMetadataAlreadyMigrated || !!metadataKeysToDelete.length || !!metadataToUpdate.length;
!isMetadataAlreadyMigrated && (!!metadataKeysToDelete.length || !!metadataToUpdate.length);
if (!isCommitRequired) {
return;
}