Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Migration Tool 2.3.2 Failing in PostProcessing Step Due to Missing Table Prefix #708

Closed
schizek opened this issue Jul 18, 2019 · 2 comments

Comments

@schizek
Copy link

schizek commented Jul 18, 2019

I am migrating from EE 1.14.4.2 to Commerce 2.3.2 using the Data Migration Tool 2.3.2. Everything is processing fine until it gets to the PostProcessing step where it's failing...

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento2.catalog_product_entity_int' doesn't exist, query was: DELETE FROM catalog_product_entity_int WHERE (value_id IN ('535690','545428','546868','551863','551890','551899','551908','551926', ...

My (sanitized) vendor/magento/data-migration-tool/etc/commerce-to-commerce/1.14.4.2/config.xml...

<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="../../config.xsd">
    <steps mode="settings">
        <step title="Settings Step">
            <integrity>Migration\Step\Settings\Integrity</integrity>
            <data>Migration\Step\Settings\Data</data>
        </step>
        <step title="Stores Step">
            <integrity>Migration\Step\Stores\Integrity</integrity>
            <data>Migration\Step\Stores\Data</data>
            <volume>Migration\Step\Stores\Volume</volume>
        </step>
    </steps>
    <steps mode="data">
        <step title="Data Integrity Step">
            <integrity>Migration\Step\DataIntegrity\Integrity</integrity>
        </step>
        <step title="EAV Step">
            <integrity>Migration\Step\Eav\Integrity</integrity>
            <data>Migration\Step\Eav\Data</data>
            <volume>Migration\Step\Eav\Volume</volume>
        </step>
        <step title="Custom Customer Attributes Step">
            <integrity>Migration\Step\CustomCustomerAttributes\Integrity</integrity>
            <data>Migration\Step\CustomCustomerAttributes\Data</data>
            <volume>Migration\Step\CustomCustomerAttributes\Volume</volume>
        </step>
        <step title="Customer Attributes Step">
            <integrity>Migration\Step\Customer\Integrity</integrity>
            <data>Migration\Step\Customer\Data</data>
            <volume>Migration\Step\Customer\Volume</volume>
        </step>
        <step title="Map Step">
            <integrity>Migration\Step\Map\Integrity</integrity>
            <data>Migration\Step\Map\Data</data>
            <volume>Migration\Step\Map\Volume</volume>
        </step>
        <step title="Url Rewrite Step">
            <integrity>Migration\Step\UrlRewrite\Version11410to2000</integrity>
            <data>Migration\Step\UrlRewrite\Version11410to2000</data>
            <volume>Migration\Step\UrlRewrite\Version11410to2000</volume>
        </step>
        <step title="Log Step">
            <integrity>Migration\Step\Log\Integrity</integrity>
            <data>Migration\Step\Log\Data</data>
            <volume>Migration\Step\Log\Volume</volume>
        </step>
        <step title="Ratings Step">
            <integrity>Migration\Step\Ratings\Integrity</integrity>
            <data>Migration\Step\Ratings\Data</data>
            <volume>Migration\Step\Ratings\Volume</volume>
        </step>
        <step title="SalesOrder Step">
            <integrity>Migration\Step\SalesOrder\Integrity</integrity>
            <data>Migration\Step\SalesOrder\Data</data>
            <volume>Migration\Step\SalesOrder\Volume</volume>
        </step>
        <step title="ConfigurablePrices step">
            <integrity>Migration\Step\ConfigurablePrices\Integrity</integrity>
            <data>Migration\Step\ConfigurablePrices\Data</data>
            <volume>Migration\Step\ConfigurablePrices\Volume</volume>
        </step>
        <step title="OrderGrids Step">
            <integrity>Migration\Step\OrderGridsEE\Integrity</integrity>
            <data>Migration\Step\OrderGridsEE\Data</data>
            <volume>Migration\Step\OrderGridsEE\Volume</volume>
        </step>
        <step title="Tier Price Step">
            <integrity>Migration\Step\TierPrice\Integrity</integrity>
            <data>Migration\Step\TierPrice\Data</data>
            <volume>Migration\Step\TierPrice\Volume</volume>
        </step>
        <step title="SalesIncrement Step">
            <integrity>Migration\Step\SalesIncrement\Integrity</integrity>
            <data>Migration\Step\SalesIncrement\Data</data>
            <volume>Migration\Step\SalesIncrement\Volume</volume>
        </step>
        <step title="Inventory Step">
            <integrity>Migration\Step\Inventory\Integrity</integrity>
            <data>Migration\Step\Inventory\Data</data>
            <volume>Migration\Step\Inventory\Volume</volume>
        </step>
        <step title="VisualMerchandiser Step">
            <integrity>Migration\Step\VisualMerchandiser\Integrity</integrity>
            <data>Migration\Step\VisualMerchandiser\Data</data>
            <volume>Migration\Step\VisualMerchandiser\Volume</volume>
        </step>
        <step title="PostProcessing Step">
            <data>Migration\Step\PostProcessing\Data</data>
        </step>
    </steps>
    <steps mode="delta">
        <step title="Custom Customer Attributes Step">
            <delta>Migration\Step\CustomCustomerAttributes\Delta</delta>
            <volume>Migration\Step\CustomCustomerAttributes\Volume</volume>
        </step>
        <step title="Customer Attributes Step">
            <delta>Migration\Step\Customer\Delta</delta>
            <volume>Migration\Step\Customer\Volume</volume>
        </step>
        <step title="Map Step">
            <delta>Migration\Step\Map\Delta</delta>
            <volume>Migration\Step\Map\Volume</volume>
        </step>
        <step title="Log Step">
            <delta>Migration\Step\Log\Delta</delta>
            <volume>Migration\Step\Log\Volume</volume>
        </step>
        <step title="SalesOrder Step">
            <delta>Migration\Step\SalesOrder\Delta</delta>
            <volume>Migration\Step\SalesOrder\Volume</volume>
        </step>
        <step title="OrderGrids Step">
            <delta>Migration\Step\OrderGridsEE\Delta</delta>
            <volume>Migration\Step\OrderGridsEE\Volume</volume>
        </step>
        <step title="SalesIncrement Step">
            <delta>Migration\Step\SalesIncrement\Delta</delta>
            <volume>Migration\Step\SalesIncrement\Volume</volume>
        </step>
        <step title="Inventory Step">
            <delta>Migration\Step\Inventory\Delta</delta>
            <volume>Migration\Step\Inventory\Volume</volume>
        </step>
    </steps>
    <source>
        <database host="localhost" name="magento1" user="my_user" password="my_password" />
    </source>
    <destination>
        <database host="localhost" name="magento2" user="my_user" password="my_password" />
    </destination>
    <options>
        <map_file>etc/commerce-to-commerce/1.14.4.2/map.xml</map_file>
        <eav_map_file>etc/commerce-to-commerce/map-eav.xml.dist</eav_map_file>
        <eav_document_groups_file>etc/commerce-to-commerce/eav-document-groups.xml.dist</eav_document_groups_file>
        <eav_attribute_groups_file>etc/commerce-to-commerce/eav-attribute-groups.xml</eav_attribute_groups_file>
        <log_map_file>etc/commerce-to-commerce/map-log.xml.dist</log_map_file>
        <log_document_groups_file>etc/commerce-to-commerce/log-document-groups.xml.dist</log_document_groups_file>
        <settings_map_file>etc/commerce-to-commerce/settings.xml.dist</settings_map_file>
        <customer_map_file>etc/commerce-to-commerce/map-customer.xml.dist</customer_map_file>
        <customer_document_groups_file>etc/commerce-to-commerce/customer-document-groups.xml.dist</customer_document_groups_file>
        <customer_attribute_groups_file>etc/commerce-to-commerce/customer-attribute-groups.xml.dist</customer_attribute_groups_file>
        <sales_order_map_file>etc/commerce-to-commerce/map-sales.xml.dist</sales_order_map_file>
        <delta_document_groups_file>etc/commerce-to-commerce/deltalog.xml.dist</delta_document_groups_file>
        <customer_attr_map_file>etc/commerce-to-commerce/customer-attr-map.xml.dist</customer_attr_map_file>
        <customer_attr_document_groups_file>etc/commerce-to-commerce/customer-attr-document-groups.xml.dist</customer_attr_document_groups_file>
        <order_grids_document_groups_file>etc/commerce-to-commerce/order-grids-document-groups.xml.dist</order_grids_document_groups_file>
        <class_map>etc/commerce-to-commerce/class-map.xml.dist</class_map>
        <visual_merchandiser_map>etc/commerce-to-commerce/visual_merchandiser_map.xml.dist</visual_merchandiser_map>
        <visual_merchandiser_document_groups>etc/commerce-to-commerce/visual_merchandiser_document_groups.xml.dist</visual_merchandiser_document_groups>
        <visual_merchandiser_attribute_groups>etc/commerce-to-commerce/visual_merchandiser_attribute_groups.xml.dist</visual_merchandiser_attribute_groups>
        <map_document_groups>etc/commerce-to-commerce/map-document-groups.xml.dist</map_document_groups>
        <tier_price_map_file>etc/commerce-to-commerce/1.14.4.2/map-tier-price.xml.dist</tier_price_map_file>
        <stores_map_file>etc/commerce-to-commerce/map-stores.xml.dist</stores_map_file>
        <!--
        In case bulk_size=0 it will be auto-detected for every document.
        -->
        <bulk_size>100</bulk_size>
        <!--
        Set direct_document_copy = 1 for better performance.
        NOTE: 'source' and 'destination' databases MUST be placed on the same MySQL instance
        and 'destination' user MUST be granted with 'SELECT' permissions on 'source' database
         -->
        <direct_document_copy>1</direct_document_copy>
        <source_prefix />
        <dest_prefix>abc123_</dest_prefix>
        <auto_resolve_urlrewrite_duplicates>1</auto_resolve_urlrewrite_duplicates>
        <log_file>migration.log</log_file>
        <progress_bar_format>%percent%% [%bar%] Remaining Time: %remaining%</progress_bar_format>
        <upgrade_customer_password_hash>1</upgrade_customer_password_hash>
        <edition_migrate>commerce-to-commerce</edition_migrate>
        <edition_number>1.14.4.2</edition_number>
        <init_statements_source>SET NAMES utf8;</init_statements_source>
        <init_statements_destination>SET NAMES utf8;</init_statements_destination>
        <crypt_key>REMOVED</crypt_key>
    </options>
</config>

I believe the issue is on the line below where it's not using the table prefix for the destination...

$this->destination->deleteRecords($document, 'value_id', $entityValueIds[$document]);

When I tested hardcoding in my prefix, it worked successfully...

$this->destination->deleteRecords('magento2_' . $document, 'value_id', $entityValueIds[$document]);

For reference, here is my open issue I posted on StackOverflow yesterday... https://magento.stackexchange.com/questions/282445/base-table-or-view-not-found-in-data-migration-tool-postprocessing-step-pref

@victor-v-rad
Copy link
Collaborator

Thank you @schizek for reporting this issue. Internal tiket MC-18493 to process it.

@mhafizumer
Copy link

t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants