2

Working on a migration from M1 1.9.2 to M2 2.3.3 and have a little problem: When migration the categories I get the following error:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2-46-0' for key 'CATALOG_CATEGORY_ENTITY_INT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID'

Looks like I have a duplicate content in the table Catalog_Category......

Could someone help me to figur out what the 2-46-0 means? I have not been able to find that row in the table.

Maybe there is a SQL quariry I can run to see if any duplicat content in that table?

2

3 Answers 3

3

Please go to your Database and find this table catalog_category_entity_int or try to run below QUERY in mysql

SELECT * FROM catalog_category_entity_int WHERE attribute_id = 46 AND store_id = 0 AND entity_id = 2

If you will get two records same then please correct value of one record or if that is not necessary then remove single row and keep only one and then check.

Hope this will help you!

12
  • Let me know if it helps. Thanks. Commented Dec 6, 2019 at 9:12
  • When I use the Query I get not results back. Commented Dec 6, 2019 at 9:13
  • Try to run this once SELECT * FROM catalog_category_entity_int WHERE attribute_id = 46 AND entity_id = 2 Commented Dec 6, 2019 at 9:15
  • Still no results for the quary. Commented Dec 6, 2019 at 9:16
  • 1
    Found the issue with the ID 46. It was in the M2 db. Commented Dec 6, 2019 at 11:29
1

Please Run Below Command :

php bin/magento migrate:settings -a vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.2.0/config.xml

php bin/magento migrate:data -a vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.2.0/config.xml
0
  • 2: category_id
  • 46: attribute_id?
  • 0: store_id

The table CATALOG_CATEGORY_ENTITY_INT doesn't allow 2 rows with those 3 columns duplicated.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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