diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/index.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/index.ts index b095e63c247..fdf0511cd89 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/index.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/index.ts @@ -192,6 +192,15 @@ export class CmsEntriesInitNewMetaFields_5_39_6_001 implements DataMigration { // Update records in primary DynamoDB table. Also do preparations for // subsequent updates on DDB-ES DynamoDB table, and in Elasticsearch. for (const item of result.items) { + const isFullyMigrated = + isMigratedEntry(item) && + hasValidTypeFieldValue(item) && + hasAllNonNullableValues(item); + + if (isFullyMigrated) { + continue; + } + const index = esGetIndexName({ tenant: item.tenant, locale: item.locale,