0

Using UB-Migration tool, Migrating from Magento 1 to Magento 2. All steps were successful apart from Step 4 Categories which failed with below error, please assist.

Error received Research: I had googled and found that its caused by the source DB(magento 1) not the M2.

I checked table: catalog_category_entity select * from catalog_category_entity WHERE parent_id is NOT null; returned: 0 rows effected.

2020/12/10 09:42:15 [error] [ub_data_migration] CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'parent_id' cannot be null. The SQL statement executed was: UPDATE `catalog_category_entity` SET `entity_id`=:yp0, `attribute_set_id`=:yp1, `parent_id`=:yp2, `created_at`=:yp3, `updated_at`=:yp4, `path`=:yp5, `position`=:yp6, `level`=:yp7, `children_count`=:yp8 WHERE `catalog_category_entity`.`entity_id`='1193'

enter image description here

2
  • I think this is a question for the UB-Migration tool developers.
    – paj
    Dec 10 '20 at 11:03
  • I purchased the tool but my licence expired, i have it running already just encountered error when i decided to move stores.
    – kb kb
    Dec 10 '20 at 13:19
0

You can migrate using Data Migration Tool :-

Install Data Migration Tool

  1. Check your Magento 2 version :- sudo php bin/magento --version

  2. Install Data Migration Tool from repo.magento.com :-

    composer config repositories.magento composer https://repo.magento.com
    composer require magento/data-migration-tool:<magento_version>

  3. Configure Magento 2 Data Migration Tool :-

    1 The above file will contain configuration and scripts for migrating from Magento 1 Open Source platform to Magento 2 Open          Source platform.
         <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc/opensource-to-opensource
    
    2 The above file will contain configuration and scripts for migrating from Magento 1 Open Source platform to Magento 2 Commerce.
         <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc/opensource-to-commerce
    
    3 The above file will contain configuration and scripts for migrating from Magento 1 Commerce to Magento 2 Commerce.
         <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc/commerce-to-commerce
    
  4. Configuring the migration :-

    1 Change to the following directory :-
      <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc/<migration edition>/<ce or version>
    
    2 Rename config.xml.dist to config.xml 
      cp config.xml.dist config.xml
    
    3 Open config.xml in a text editor.
    
    4 Specify the following at minimum:
    
            <database host="localhost" name="Magento1-DB-name" user="DB-username" password="DB-password"/>
    
            </source>
    
            <destination>
    
            <database host="localhost" name="Magento2-DB-name" user="DB-username" password="DB-password"/>
    
            </destination>
    
            <options>
    
            <crypt_key>Magento1-Encrypted-Key</crypt_key>
    
            </options>
    
  5. Migrate settings :-

        php bin/magento migrate:settings --reset vendor/magento/data-migration-tool/etc/<edition-to-edition>/<version>/config.xml
    
  6. Migrate Data :-

        php bin/magento migrate:data --reset vendor/magento/data-migration-tool/etc/<edition-to-edition>/<version>/config.xml
    
        php bin/magento migrate:data --auto vendor/magento/data-migration-tool/etc/<edition-to-edition>/<version>/config.xml
    
  7. Migrate Delta :-

        php bin/magento migrate:delta --reset vendor/magento/data-migration-tool/etc/<edition-to-edition>/<version>/config.xml
    
        php bin/magento migrate:delta --auto vendor/magento/data-migration-tool/etc/<edition-to-edition>/<version>/config.xml
    
1
  • Thanks, ill test and revert back with feedback
    – kb kb
    Dec 14 '20 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.