Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Upgrading 1.4.0.1 to 1.6.2 and got error “Integrity constraint violation: 1062 Duplicate entry ‘27-General’…”
 
FetchDesigns
Sr. Member
 
Avatar
Total Posts:  124
Joined:  2008-04-11
Chicago, IL
 

I am trying to update my Magento store from version v1.4.0.1 to v 1.6.2.  I was following the steps on the site below but got stuck on Step 8…

http://duntuk.com/magento-upgrade-15

When I went to the URL in the browser and after a long time loading I got this error…

Error in file"/Applications/XAMPP/xamppfiles/htdocs/mysite.local/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php" SQLSTATE[23000]Integrity constraint violation1062 Duplicate entry '0-147' for key 'UNQ_BY_CUSTOMER'

I tried accessing the site again and it took another chunk of time loading and now all I get is this error…

Error in file"/Applications/XAMPP/xamppfiles/htdocs/mysite.local/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php" SQLSTATE[23000]Integrity constraint violation1062 Duplicate entry '27-General' for key 'UNQ_MAG_EAV_ATTR_GROUP_ATTR_SET_ID_ATTR_GROUP_NAME'

Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
FetchDesigns
Sr. Member
 
Avatar
Total Posts:  124
Joined:  2008-04-11
Chicago, IL
 

To answer my own question, I tracked down the issue where Magento was mad that I had several attribute groups with a name of “General” and a default id of “0” instead of “1”.  I ran the SQL statement below, accessed my homepage through the browser again and things continued updating!  Phew!

UPDATE  `mag_eav_attribute_group
SET `default_id` = 1
WHERE 
`attribute_group_name` = "General" AND `default_id` = 0
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top