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

Page 1 of 2
Upgrading from 1.3.2.4 to 1.6
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

I’m attempting to update a store from 1.3.2.4 to 1.6 and I hear the best way to do it is baby steps - 1.3.2.4 > 1.4.2.0 > 1.5 > 1.6.

My update from 1.3.2.4 to 1.4.2.0 goes smoothly but when I try to update to 1.5 or 1.6, I get an error:
ERROR: Error in file: “/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-1.4.0.21-1.4.0.22.php” - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘00317305’ for key ‘UNQ_INCREMENT_ID’.

The only thing I can think of is I had Fooman’s Invoice = Order Number extension installed that makes the invoice and order numbers all the same for easier accounting tracking.

Any idea how to fix this?

My upgrade method is as follows:
Set default theme
Turn off all 3rd party extensions
Remove all files
Unzip new installer and point to old database

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

@Brady:: Can you look in your database and see if you can find the duplicate orders? They are most likely order->invoice->shipping->credit numbers

Look at the sales orders table in the database

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

One more thing: You should be able to go directly from 1.3->1.6. Depending on how many orders you have it could take a while

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 
Brent W Peterson - 12 October 2011 02:34 PM

One more thing: You should be able to go directly from 1.3->1.6. Depending on how many orders you have it could take a while

Hum. I may try that.

We have just over 7,000 orders. I don’t mind waiting, as long as it works.

Not sure if it makes a difference, but I’m running on a MAMP environment so the live site is not disturbed until I have an upgrade solution.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

Local is good, just make sure you set you apache timeout to 18000, set your php execution timeout to 0 (Unlimited)

130k orders takes 20 hours - so you could expect 5-6 hour depending on how many resources you have committed to your mamp

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 
Brent W Peterson - 12 October 2011 02:45 PM

Local is good, just make sure you set you apache timeout to 18000, set your php execution timeout to 0 (Unlimited)

130k orders takes 20 hours - so you could expect 5-6 hour depending on how many resources you have committed to your mamp

Thanks for the tips. Much appreciated!

UPDATE:
Finally got the upgrade to work! Went straight from 1.3.2.4 to 1.6.

The problem was I had multiple stores setup and they used the same Order Numbers, which was causing the duplicate entry error. Once I changes all the order, invoice, shipping and refund numbers in the second store, the upgrade went smoothly.

Only took about 15 minutes!

 
Magento Community Magento Community
Magento Community
Magento Community
 
bluestormnm
Jr. Member
 
Total Posts:  1
Joined:  2011-10-17
 

Ive got the same problem, although I dont have multiple stores, just the one.

How did you go about removing your duplicates Brady?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 
bluestormnm - 17 October 2011 11:15 AM

Ive got the same problem, although I dont have multiple stores, just the one.

How did you go about removing your duplicates Brady?

Basically just by querying the database directly and manually changing the duplicates. I’m sure there’s a way to just make the changes via the query window, but I didn’t take the time to figure it out since we had so few duplicates (only around 20).

(Note, our orders start with ‘ME-’, hence the inclusion below)

SELECT *
FROM `sales_flat_invoice_grid`
WHERE store_id LIKE ‘2’
AND (increment_id LIKE ‘ME-%’ OR order_increment_id LIKE ‘ME-%’)

SELECT *
FROM `sales_flat_order`
WHERE store_id LIKE ‘2’
AND increment_id LIKE ‘ME-%’

SELECT *
FROM `sales_flat_order_grid`
WHERE store_id LIKE ‘2’
AND increment_id LIKE ‘ME-%’

SELECT *
FROM `sales_flat_shipment_grid`
WHERE store_id LIKE ‘2’
AND (increment_id LIKE ‘ME-%’ OR order_increment_id LIKE ‘ME-%’)

SELECT *
FROM `sales_flat_creditmemo`
WHERE store_id LIKE ‘2’
AND increment_id LIKE ‘ME-%’

SELECT *
FROM `sales_flat_creditmemo_grid`
WHERE store_id LIKE ‘2’
AND (increment_id LIKE ‘ME-%’ OR order_increment_id LIKE ‘ME-%’)

SELECT *
FROM `sales_flat_invoice`
WHERE store_id LIKE ‘2’
AND increment_id LIKE ‘ME-%’

SELECT *
FROM `sales_flat_shipment`
WHERE store_id LIKE ‘2’
AND increment_id LIKE ‘ME-%’

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rodcos
Jr. Member
 
Avatar
Total Posts:  7
Joined:  2009-12-19
 
Brady - 12 October 2011 02:46 PM


UPDATE:
Finally got the upgrade to work! Went straight from 1.3.2.4 to 1.6.

Only took about 15 minutes!

Brady, I’m also trying to update from 1.3.2.4 to 1.6. Would you mind sharing exactly how you managed to get it done?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

Here is my process going from 1.3.2.4 to 1.6. I suggest NOT doing it on your live site.

--------------------------------
- Backup your current Magento files and database

- [ADMIN] Disable Magento caches
- [ADMIN] Activate default theme (turn off custom theme)
- [ADMIN] Deactivate all third party extensions
- [IDE] Delete all the Magento files except the Media folder (you have your backup version, right?). Leave the Magento database in-place.
- [IDE] Unzip the 1.6 installer

- [TERMINAL] Fix permissions on all files and folders:

find . -type f -exec chmod 777 {} \;
find . -type d -exec chmod 777 {} \;
chmod o+var var/.htaccess app/etc
chmod 
-R o+w media

- [BROWSER] Run the Magento 1.6 installer, inputting your 1.3.2.4 database information

It SHOULD upgrade successfully. If it does:

- [TERMINAL] Fix permissions on all files and folders: (Note: different from above)

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod o+var var/.htaccess app/etc
chmod 
-R o+w media

- [ADMIN] Rebuild Indexes
- [ADMIN] Enable caching
- [ADMIN / MAGENTO CONNECT] Re-install any necessary extensions

The tricky part is getting your theme to work, which it probably won’t, unless you’re using a stock theme.

------------------------------

Unfortunately my upgrade was met with “duplicate entry” errors when updating the database, because I was running a multi-store setup and the order numbers were the same across some of the stores. Once I fixed the duplicate entries, the upgrade went smoothly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kiatng
Enthusiast
 
Total Posts:  875
Joined:  2008-09-03
Kuala Lumpur, Malaysia
 

@Brent W. Peterson Thanks for the tip on upgrading from 1.3.2.4 to 1.6, I will give it a go next month.

@Brady Thanks for sharing the steps. Were you able to update the production?

 
Magento Community Magento Community
Magento Community
Magento Community
 
codywood010
Jr. Member
 
Total Posts:  1
Joined:  2011-02-17
 

All went well for me. For some reason I kept trying to go from 1.3.2.4 to 1.6.1 then I found this and BAM! Worked perfect with zero errors. Thank you so much for your post, it saved me lots of time and frustration.

 
Magento Community Magento Community
Magento Community
Magento Community
 
scjunkies
Member
 
Total Posts:  55
Joined:  2008-09-03
Houston, Texas, USA
 

I will try it as well..... it is scary for a non-tech person but it looks straight forward.  Thanks for the info.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

Just remember the more orders you have an store views it will make your upgrade more difficult.

For example if you have 200,000 orders in your 1.3 database, it is going to be a longer and potentially more difficult than a database with only 2000 orders.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iLama
Jr. Member
 
Total Posts:  4
Joined:  2009-04-23
 
Brent W Peterson - 05 November 2011 05:27 AM

Just remember the more orders you have an store views it will make your upgrade more difficult.

For example if you have 200,000 orders in your 1.3 database, it is going to be a longer and potentially more difficult than a database with only 2000 orders.

This is exactly the situation I’m in now, but more like 150,000 orders. Everything goes fine but it seems like updating the database is taking over 3 hours now and I’m not sure what to do.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

If you are upgrading from 1.3->1.6 your database upgrade could take as long as 25 hours with 150,000 orders

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2