Always save applied migration regardless of changes
In case open migrations did not apply any changes, the applied migration did not get updated. This causes unnecessary logic to run everytime the metadata are read.
This commit is contained in:
@@ -319,8 +319,7 @@ const commitMigratedMetadata = (
|
||||
|
||||
const isMetadataAlreadyMigrated = !metadata || migrationId === METADATA_MIGRATIONS.length;
|
||||
|
||||
const isCommitRequired =
|
||||
!isMetadataAlreadyMigrated && (!!metadataKeysToDelete.length || !!metadataToUpdate.length);
|
||||
const isCommitRequired = !isMetadataAlreadyMigrated;
|
||||
if (!isCommitRequired) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user