Skip to content

Commit 387e04f

Browse files
committed
MC-31156: [GitHub] Error during migration when use prefix for tables #791
1 parent 828f7b1 commit 387e04f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Migration/Step/PostProcessing/Data/DeletedRecordsCounter.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,11 @@ public function saveChanged($documents)
9292
$documentsToSave = [];
9393
$documents = array_unique(array_merge($this->deltaDocuments, $documents));
9494
foreach ($documents as $document) {
95-
$recordsCountSource = $this->source->getRecordsCount(
96-
$this->mapReader->getDocumentMap($document, MapInterface::TYPE_DEST)
97-
);
95+
$documentMap = $this->mapReader->getDocumentMap($document, MapInterface::TYPE_DEST);
96+
if (!$documentMap) {
97+
continue;
98+
}
99+
$recordsCountSource = $this->source->getRecordsCount($documentMap);
98100
$recordsCountDestination = $this->destination->getRecordsCount($document);
99101
if ($recordsCountSource != $recordsCountDestination) {
100102
$documentsToSave[$document] = $recordsCountSource - $recordsCountDestination;

0 commit comments

Comments
 (0)