Showing results for 
Search instead for 
Did you mean: 

Upgrade from CE version to latest 1.9 version

Upgrade from CE version to latest 1.9 version

My client is running a highly customized version of magento CE  I have successfully extricated all of the custom code into local modules and custom themes and installed the changes onto a clean release version of 


The magento documentation says the upgrade path is>1.7->1.9.x.x but my first attempt to upgrade> failed.  Google searches produced many items that said you should upgrade>1.4.2->> stepwise fashion until you get to the level you want.  Labor intensive for sure, but I was willing to do that.


I was successful in an upgrade to 1.4.2 by doing the following:

* Downloaded and installed a clean version1.4.2 system

* Truncated all log files, and dumped the client's database

* Created a new database and loaded dumped database

* Ran install of 1.4.2 pointing to new database


Tried to repeat the process above to go from> and got the following error:

a:5:{i:0;s:224:"Error in file: "C:\xampp\htdocs\magento1501\app\code\core\Mage\Sales\sql\sales_setup\mysql4-upgrade-" - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'UNQ_INCREMENT_ID'";i:1;s:998:"#0 C:\xampp\htdocs\magento1501\app\code\core\Mage\Core\Model\Resource\Setup.php(390): Mage::exception('Mage_Core', 'Error in file: ...')


I have no idea what to do about this error (but have tried alot of things).  Any suggestions?  (BTW:  the> gave me a similar error though it might have been in a different module:  customer vs. sales).  



Re: Upgrade from CE version to latest 1.9 version

It's possible that you have a data integrity problem. Viewing that upgrade script: app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-, what it does is add an unique key on the increment_id column. This failing suggests that in one of these tables you have duplicate increment IDs: 


'sales/order', 'sales/order_grid', 'sales/creditmemo', 'sales/creditmemo_grid',
'sales/invoice', 'sales/invoice_grid', 'sales/shipment','sales/shipment_grid'


I'd recommend going through and trying to remove items that are duplicates manually. Be sure to take a backup first. 


There's a useful post on stackoverflow of someone with a similar experience:

If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!

Re: Upgrade from CE version to latest 1.9 version

Hello @mbachman

It seems this is going complex for you,

You should hire any Magento Professional in this case to perform Upgrade for you like