Skip to content

Getting Integrity constraint violation: 1062 Duplicate entry after updating extension

After updating one of my extensions (which was required because I updated to Magento 2.4.4), I am getting this error when I run the upgrade command:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '646-1' for key 'AMASTY_ORDER_ATTRIBUTE_ENTITY_ENTITY_ID_PARENT_ENTITY_TYPE', query was: ALTER TABLE `amasty_order_attribute_entity` ADD CONSTRAINT `AMASTY_ORDER_ATTRIBUTE_ENTITY_ENTITY_ID_PARENT_ENTITY_TYPE` UNIQUE KEY (`entity_id`,`parent_entity_type`)

Any idea how to fix that?

Thanks!