3

Unique constraint violation found on "catalog_product_entity_tier_price".

Magento version 2.2.6:

I have migrated data Magento1 to Magento2, i but some how catalog_product_entity_tier_price for this table constraint violation issue found.

query was: INSERT INTO `catalog_product_entity_tier_price` (`entity_id`, `all_groups`, `customer_group_id`, `qty`, `value`, `percentage_value`, `website_id`) VALUES (?, ?, ?, ?, ?, ?, ?) at /var/www/html/magento2/gsp/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:580, Zend_Db_Statement_Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '65-0-7-1.0000-0' for key 'UNQ_E8AB433B9ACB00343ABB312AD2FAB087', query was: INSERT INTO `catalog_product_entity_tier_price` (`entity_id`, `all_groups`, `customer_group_id`, `qty`, `value`, `percentage_value`, `website_id`) VALUES (?, ?, ?, ?, ?, ?, ?) at /var/www/html/magento2/gsp/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '65-0-7-1.0000-0' for key 'UNQ_E8AB433B9ACB00343ABB312AD2FAB087' at /var/www/html/magento2/gsp/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"} []

CASE 1: I have set Tire price in Magento2 for all different customer Group, When I insert this entry it will violate my entry

CASE 2: For delete process not work properly

File : vendor/magento/framework/EntityManager/Operation/Update.php

This exception will comes with this file

9
  • I have the same problem .. Did you find a solution? Do you work with the API to push a product? What does select * from catalog_product_entity_tier_price where entity_id = 65 show?
    – Alex
    Commented May 31, 2019 at 3:41
  • @Alex have you migrated database ?
    – Divyesh
    Commented Jun 4, 2019 at 6:07
  • Yes we did migrate the database with bin/magento setup:upgrade
    – Alex
    Commented Jun 5, 2019 at 14:30
  • No @Alex i mean to say have your project migrated Magento1 to Magento2 ?
    – Divyesh
    Commented Jun 6, 2019 at 4:43
  • No it's just a Magento 2 project
    – Alex
    Commented Jun 6, 2019 at 5:05

0

Your Answer

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

Browse other questions tagged or ask your own question.