diff --git a/Neos.ContentRepositoryRegistry/Classes/Service/EventMigrationService.php b/Neos.ContentRepositoryRegistry/Classes/Service/EventMigrationService.php index 1e7364dcee..34a23dc5fc 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Service/EventMigrationService.php +++ b/Neos.ContentRepositoryRegistry/Classes/Service/EventMigrationService.php @@ -774,6 +774,11 @@ public function reorderNodeAggregateWasRemoved(\Closure $outputFn): void // get all NodeAggregateWasRemoved from the live content stream $eventsToReorder = iterator_to_array($this->eventStore->load($liveContentStreamName, EventStreamFilter::create(EventTypes::create(EventType::fromString('NodeAggregateWasRemoved')))), false); + if (!count($eventsToReorder)) { + $outputFn('Migration was not necessary.'); + return; + } + // remove all the NodeAggregateWasRemoved events at their sequenceNumbers $eventTableName = DoctrineEventStoreFactory::databaseTableName($this->contentRepositoryId); $this->connection->beginTransaction();