When trying to recreate the M2 migration tables by running 98-magerun.phar m2-migration:delta-update-changelog it fails with this error:
[Zend_Db_Statement_Exception] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'm1_database.customer_visitor' doesn't exist, query was: SELECT `customer_visitor`.`visitor_id` FROM `customer_visitor`
[PDOException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'm1_database.customer_visitor' doesn't exist
It seems like the tool uses the Magento 1 db connection to query the database for magento 2 migrated data. Because the table names are different, this fails.
My workaround was to add
$m2DbObject = new \Magento_Db_Adapter_Pdo_Mysql($m2Db);
$m2DbObject->getConnection();
When trying to recreate the M2 migration tables by running
98-magerun.phar m2-migration:delta-update-changelog
it fails with this error:It seems like the tool uses the Magento 1 db connection to query the database for magento 2 migrated data. Because the table names are different, this fails.
My workaround was to add
in https://github.com/peterjaap/magerun-addons/blob/master/src/Elgentos/Magento/Command/Migration/DeltaUpdateChangelogCommand.php#L109
This is probably not a real fix and more a workaround, but after that, it worked like a charm.