Try the Demo

Magento Forum

   
Page 10 of 12
How to upgrade from 1.5.1 to 1.6.0
 
cerebrum
Sr. Member
 
Avatar
Total Posts:  82
Joined:  2009-02-16
Sao Paulo
 

After a few minutes just happened the following error in site

---
a:5:{i:0;s:69:"Item (Mage_Catalog_Model_Product) with the same id “21” already exist";i:1;s:3646:"#0 /var/www/cerebrum/magento/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(256): Varien_Data_Collection->addItem(Object(Mage_Catalog_Model_Product))
#1 /var/www/cerebrum/magento/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1017): Mage_Eav_Model_Entity_Collection_Abstract->addItem(Object(Mage_Catalog_Model_Product))
#2 /var/www/cerebrum/magento/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(831): Mage_Eav_Model_Entity_Collection_Abstract->_loadEntities(false, false)
#3 /var/www/cerebrum/magento/lib/Varien/Data/Collection.php(740): Mage_Eav_Model_Entity_Collection_Abstract->load()
#4 /var/www/cerebrum/magento/app/code/core/Mage/Reports/Block/Product/Abstract.php(160): Varien_Data_Collection->count()
#5 /var/www/cerebrum/magento/app/code/core/Mage/Reports/Block/Product/Viewed.php(67): Mage_Reports_Block_Product_Abstract->getCount()
#6 /var/www/cerebrum/magento/app/code/core/Mage/Reports/Block/Product/Viewed.php(78): Mage_Reports_Block_Product_Viewed->getCount()
#7 /var/www/cerebrum/magento/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Reports_Block_Product_Viewed->_toHtml()
#8 /var/www/cerebrum/magento/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#9 /var/www/cerebrum/magento/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#10 /var/www/cerebrum/magento/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#11 /var/www/cerebrum/magento/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml(’left’, true)
#12 /var/www/cerebrum/magento/app/design/frontend/base/default/template/page/3columns.phtml(51): Mage_Core_Block_Abstract->getChildHtml(’left’)
#13 /var/www/cerebrum/magento/app/code/core/Mage/Core/Block/Template.php(241): include(’/var/www/cerebr...’)
#14 /var/www/cerebrum/magento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView(’frontend/base/d...’)
#15 /var/www/cerebrum/magento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#16 /var/www/cerebrum/magento/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#17 /var/www/cerebrum/magento/app/code/core/Mage/Core/Model/Layout.php(529): Mage_Core_Block_Abstract->toHtml()
#18 /var/www/cerebrum/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(391): Mage_Core_Model_Layout->getOutput()
#19 /var/www/cerebrum/magento/app/code/core/Mage/Cms/Helper/Page.php(132): Mage_Core_Controller_Varien_Action->renderLayout()
#20 /var/www/cerebrum/magento/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_PageController), ‘20’)
#21 /var/www/cerebrum/magento/app/code/core/Mage/Cms/controllers/PageController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_PageController), ‘20’)
#22 /var/www/cerebrum/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Cms_PageController->viewAction()
#23 /var/www/cerebrum/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch(’view’)
#24 /var/www/cerebrum/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#25 /var/www/cerebrum/magento/app/code/core/Mage/Core/Model/App.php(347): Mage_Core_Controller_Varien_Front->dispatch()
#26 /var/www/cerebrum/magento/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#27 /var/www/cerebrum/index.php(78): Mage::run(’cerebrum’, ‘store’)
#28 {main}”;s:3:"url”;s:19:"/index.php/catalogo”;s:11:"script_name”;s:10:"/index.php”;s:4:"skin”;s:8:"cerebrum";}
---

Is there a fix?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Exotic Corpse
Jr. Member
 
Total Posts:  14
Joined:  2009-05-19
 
brendanf - 01 September 2011 08:23 PM

This worked for me from Mage 1.5.1.0 (never could get the new ./mage working...although the old ./pear channel always worked).

From the Magento root directory via SSH run:

wget http://www.magentocommerce.com/downloads/assets/1.6.0.0/magento-1.6.0.0.tar.gz

Then extract it:

tar -zxvf magento-1.6.0.0.tar.gz

Then enter the extracted directory:

cd magento

Then copy the new files back:

cp -rf * ../.

Also get the .htaccess file (I think this is required):

cp .htacess ../.

Then cleanup the downloaded files:

cd ../
rm -rf magento
rm magento
-1.6.0.0.tar.gz

Open the site’s homepage in your browser. It will probably throw SQL errors and continue loading. If you refresh it will probably throw a different SQL error, but don’t do this. Just let it run. Depending on your server it might take 2-30 minutes to upgrade the DB. Who knows. My dev server took about 10.

I like to run this command via SSH:

top

You can monitor the SQL process. When it stops chewing up memory and CPU it’s done (or it crashed). Type ‘q’ to return to the shell prompt. Then refresh the site’s homepage in your browser. Worked for me.

Test the Magento admin. Should say 1.6.0.0 in the footer.

FYI, this info is partially based on this post:
http://www.magentocommerce.com/boards/viewthread/219570/P30/#t301770

This worked perfectly. No errors. Everything running smoooooth!

 
Magento Community Magento Community
Magento Community
Magento Community
 
GPutignano
Sr. Member
 
Avatar
Total Posts:  214
Joined:  2007-11-03
Lauria - Italy
 

I have in my database some table that end with the suffix _tmp.
Can I delete them before trying to upgrade?

 Signature 

La Compagnia del Cavatappi, Enoteca specializzata in Vini.
Se cerchi un Agriturismo in Italia visita Vacanze in Agriturismo.

 
Magento Community Magento Community
Magento Community
Magento Community
 
gfxpixeldesigns
Member
 
Total Posts:  48
Joined:  2009-06-26
 

Glad to hear im not the only one going through this.

I decided to attempt an upgrade from 1.5.1.0 to 1.6.0.0 which was a big mistake. First attempt was through magento connect which complained about the magento core conflicting with googleshopping, tried to uninstall googleshopping but it wouldnt have it so i then went down the ssh route..

From my magento directory i ran:

rm -rf var/cache/*
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*

rm -rf downloader
rm -rf app/design/frontend/base 

cp -a magento/downloader .
cp -a magento/app/design/frontend/base/ app/design/frontend/

cp magento/mage .
chmod 750 ./mage 

./mage mage-setup .
./mage sync --force
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force
rm -rf var/cache/*
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
chmod 755 mage
./mage upgrade-all --force

find . -type f -exec chmod 644 {} \\;
find . -type d -exec chmod 755 {} \\;

chmod -R 755 download
chmod 550 mage
chmod o+w var var/.htaccess app/etc
chmod -R o+w media 

php shell/indexer.php reindexall

At this point i visited the frontend of my site, it hung for a few minutes until finally it errored with \’500 internal server error\’. I refreshed a few times, same thing happened. Tried to access /admin, same thing there. The only thing that i can access is /downloader.

There are no errors shown in my error log but in /var/report i have these errors:

a:5:{i:0;s:286:\"Error in file: \"/home/*/public_html/*/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php\" - SQLSTATE[HY000]: General error: 1025 Error on rename of \'./*/catalog_product_bundle_price_index\' to \'./*/#sql2-63a-b0c\' (errno: 152)\";i:1;s:1112:\"#0 /home/*/public_html/*.com/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception(\'Mage_Core\', \'Error in file: ...\')

a:5:{i:0;s:236:\"Error in file: \"/home/*/public_html/*.com/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php\" - SQLSTATE[HY000]: General error: 1005 Can\'t create table \'./*/#sql-63a_93b.frm\' (errno: 121)\";i:1;s:1112:\"#0 /home/*/public_html/*.com/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception(\'Mage_Core\', \'Error in file: ...\')

My main problem is that i tried this on a live site which was a big mistake, i deliberatly waited a while before attempting the upgrade thinking all the problems would have been logged and it was going to be relatively straightforward.

So at this point my site was completelely broken, luckily i did have backups so i restored the files back. However, i believe my database has been partially upgraded and im scared to restore the database backup as recent orders / customers would be lost. My site seems to be working fine but i just dont know, hopefully i can get this darn thing to upgrade and not have to worry about it.

Anyway since restoring the site i\’ve copied my live site over to a test domain and blocked all access so that i only i can get in there, this is what i should have done in the first place ! I\’ve now tried multiple times to update my test install but it just isnt happening, the same thing seems to happen every time with the internal server error. I\’ve followed multiple threads on here with different suggestions but so far nothing has helped.

I\’m about ready to give up as i\’ve been at this for the best part of 48 hours now. Does anyone have a defintive guide that will work or any suggestions ?

Thanks in advance

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

At this point you may want to manually upgrade, you don’t have to do all the steps in such detail as the WIKI describes,

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/manual_upgrade_using_fresh_install_and_original_database

Take your backup database and upgrade it with a Fresh copy of Magento. This will ensure you have not modules/Theme files that will interfere.

 Signature 

Brent W. Peterson
Chief Magento Evangelist for WagentoCreative
==========
Follow me on Twitter @brentwpeterson

**Always remember to backup before trying anything new

 
Magento Community Magento Community
Magento Community
Magento Community
 
gfxpixeldesigns
Member
 
Total Posts:  48
Joined:  2009-06-26
 
Brent W Peterson - 13 September 2011 05:34 AM

At this point you may want to manually upgrade, you don’t have to do all the steps in such detail as the WIKI describes,

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/manual_upgrade_using_fresh_install_and_original_database

Take your backup database and upgrade it with a Fresh copy of Magento. This will ensure you have not modules/Theme files that will interfere.

Thanks Brent although your suggestion didnt directly resolve my issue it definately helped so thanks for that.

From your wiki i gathered i was supposed to copy my live site files to a test environment, dump the live database and import it to a new one on the test environment. I would then login to the admin and change all my packages to default, disable the cache, reindex and then copy the 1.6 files over the top. Finally executing the homepage (index.php) in the shell which in theory should update the database only instead came those dreaded errors again.

In the end the only way i have got the update to work is by commenting out all the errors that were referenced by /var/report/. The majority of the errors were referencing tables that already existed or couldnt be renamed, whether or not skipping these will cause any issues i dont know but without skipping these i would still be on 1.5. My updated install does however seem fine upto now grin.

For anyone else with similar problems here are my exact steps:

1. copy all files from your live site to a test environment, preferably another domain.
2. block all access to your test domain using your htaccess file, only allow your ip address.
3. dump your live database and import it to a new database on your test environment
4. edit core_config_data in your database updating the urls to your test domain urls
5. under your test files change settings in /app/etc/local.xml basically change the database settings so they point to the new test one
6. login to your test backend, it should be identical to your live site, if not something is wrong
7. in the backend under config > design settings change everything to default
8. clear cache and reindex
9. turn cahce off
10. check your site is still operational, it will possibly look different from your live site at this point but dont worry.
11. copy the magento 1.6 files directly over your test install files, overwiting any files.
12. immediately reblock access to your site again as done in step 2 as the htaccess was just overwritten.
13. open app/etc/config.xml and change initstatements to:

<initstatements>SET NAMES utf8SET FOREIGN_KEY_CHECKS=0SET UNIQUE_CHECKS=0;</initstatements>
14. at this point you can either visit your test site in a browser or via a shell (SSH) command. If you decide to visit using your browser let it load completely , it will likely reference an error number which can be found in /var/report/. Occassionaly you may receive an internal server error, if this is the case just reload. If you decide to use the shell command make sure you cd to your test directory and run
nohup php index.php log-YY-MM-DD_1
i dont know what the above does, presumably just executes index.php and saves a log of the results in your root folder. When it finishes check the log files its created, any errors will be shown there and as with the browser error will reference an error number which can be found in /var/report/
15. make note of the errors and open the appropriate files. for me the majority came from /app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php and i just commented out what ever was referenced using #
16. keep repeating steps 14 - 15 until your site loads
17. login to the test backend
18. under config > design change settings back to what you had them at before
19. enabled cahce, clear cache, reindex (note you may need to reindex more than once)
20. check site is functioning correctly, at this point it should look identical your live site only that it updated
21. if everything is good repeat the above for your live site

I’ve personally tested the above 3 times now, its quite a lengthy process but it does eventually get the job done. Ideally though this needs to be fixed by magento as its not exactly easy, if you have no coding knowledge your basically stuck with 1.5 for now.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jam13
Jr. Member
 
Total Posts:  8
Joined:  2008-09-17
 

Just encountered exactly the same problem as others on this thread:

“Error in file: “/xxx/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php” - SQLSTATE[HY000]: General error: 1025 Error on rename of ‘./magento/#sql-25de_742’ to ‘./magento/sales_flat_order_item’ (errno: 150)”

The solution (at least it worked for me and doesn’t go to the lengths of disabling all the contraint checks) is to comment out the command on line 753 of app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php. The upgrade should continue from where it failed.

For more details see my blog post: Magento 1.6 Upgrade

Jamie

 
Magento Community Magento Community
Magento Community
Magento Community
 
tbrinkley
Jr. Member
 
Avatar
Total Posts:  3
Joined:  2010-09-26
 

This is how I upgrade thanks to SimpleHelix.com’s help plus some of my own stuff:
You will need a development site to upgrade correctly.  In my case, I am using an Apple with MAMP installed running PHP 5.2.8. 
Log in as an admin to the Magento production website
BACKUP DATABASE
Go to the System tab > Tools > Backups
In the top right click click the button “Backup”
This backs up the entire database
Download the file by clicking “gz” in the Download column on the same page
Unzip the file and install it to your development database.  If you already had a development magento database, either create a new one or, dump the old one and have the development version of Magento use it.  These setting can be changed in the app/etc/local.xml file.
BACKUP FILE STRUCTURE
Next backup all the files and folders in the production server folder.  See the picture below for an example:

Download the version you want to install

Next open a terminal window such “Terminal” or “PuTTY” and copy the newly downloaded files to folder where the development server is. Also make sure to copy the .htaccess files. e.g.
cp -pvr ./magento/* .
cp -pvr ./magento/.ht* .
Remove the following two directories: /var/cache and /var/session
rm -rf ./var/cache ./var/session
Test your development website,
If you get an saying it can’t connect check the app/etc/local.xml file
If it redirects to the production website, follow the two steps below:
Localhost Redirection to live production website
Delete the cache folder under /var
Enter to your local database, and search into the table core_config_data, for two keys, called: web/unsecure/base_url and web/secure/base_url and change them from the production server to the testing server.
If everything works, on both the frontend and the admin end, FTP the whole website back up to the production server.  There is no need to update the database on the production server as it will update itself once the new files are accessed.

The attached PDF has better looking directions.

I had the following error after the upgrade.  However, after hitting refresh and waiting a few more minutes, it worked itself out thanks to Magento’s code.

PDOException Object
(
[message:protected] => SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘0-1’ for key ‘UNQ_BY_CUSTOMER’
[string:private] =>
[code:protected] => 23000
[file:protected] => /Applications/MAMP/htdocs/lib/Zend/Db/Statement/Pdo.php
[line:protected] => 228
[trace:private] => Array
(
[0] => Array
(
[file] => /Applications/MAMP/htdocs/lib/Zend/Db/Statement/Pdo.php
[line] => 228
[function] => execute
[class] => PDOStatement
[type] => ->
[args] => Array
(
[0] => Array
(
)

)

)

[1] => Array
(
[file] => /Applications/MAMP/htdocs/lib/Varien/Db/Statement/Pdo/Mysql.php
[line] => 110
[function] => _execute
[class] => Zend_Db_Statement_Pdo
[type] => ->
[args] => Array
(
[0] => Array
(
)

)

)

[2] => Array
(
[file] => /Applications/MAMP/htdocs/lib/Zend/Db/Statement.php
[line] => 300
[function] => _execute
[class] => Varien_Db_Statement_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] => Array
(
)

)

)

[3] => Array
(
[file] => /Applications/MAMP/htdocs/lib/Zend/Db/Adapter/Abstract.php
[line] => 479
[function] => execute
[class] => Zend_Db_Statement
[type] => ->
[args] => Array
(
[0] => Array
(
)

)

)

[4] => Array
(
[file] => /Applications/MAMP/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php
[line] => 238
[function] => query
[class] => Zend_Db_Adapter_Abstract
[type] => ->
[args] => Array
(
[0] => ALTER TABLE `magentoreport_viewed_product_index` MODIFY COLUMN `customer_id` int UNSIGNED NOT NULL COMMENT ‘’
[1] => Array
(
)

)

)

[5] => Array
(
[file] => /Applications/MAMP/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 389
[function] => query
[class] => Zend_Db_Adapter_Pdo_Abstract
[type] => ->
[args] => Array
(
[0] => ALTER TABLE `magentoreport_viewed_product_index` MODIFY COLUMN `customer_id` int UNSIGNED NOT NULL COMMENT ‘’
[1] => Array
(
)

)

)

[6] => Array
(
[file] => /Applications/MAMP/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 327
[function] => query
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] => ALTER TABLE `magentoreport_viewed_product_index` MODIFY COLUMN `customer_id` int UNSIGNED NOT NULL COMMENT ‘’
)

)

[7] => Array
(
[file] => /Applications/MAMP/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 924
[function] => raw_query
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] => ALTER TABLE `magentoreport_viewed_product_index` MODIFY COLUMN `customer_id` int UNSIGNED NOT NULL COMMENT ‘’
)

)

[8] => Array
(
[file] => /Applications/MAMP/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 1110
[function] => modifyColumn
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] => magentoreport_viewed_product_index
[1] => customer_id
[2] => Array
(
[type] => integer
[unsigned] => 1
[nullable] =>
)

)

)

[9] => Array
(
[file] => /Applications/MAMP/htdocs/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php
[line] => 1163
[function] => modifyTables
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] => Array
(
[magentocustomer_entity] => Array
(
[columns] => Array
(
[entity_id] => Array
(
[type] => integer
[identity] => 1
[unsigned] => 1
[nullable] =>
[primary] => 1
[comment] => Entity Id
)

[entity_type_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Type Id
)

[attribute_set_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Attribute Set Id
)

[website_id] => Array
(
[type] => smallint
[unsigned] => 1
[comment] => Website Id
)

[email] => Array
(
[type] => text
[length] => 255
[comment] => Email
)

[group_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Group Id
)

[increment_id] => Array
(
[type] => text
[length] => 50
[comment] => Increment Id
)

[store_id] => Array
(
[type] => smallint
[unsigned] => 1
[default] => 0
[comment] => Store Id
)

[created_at] => Array
(
[type] => timestamp
[nullable] =>
[comment] => Created At
)

[updated_at] => Array
(
[type] => timestamp
[nullable] =>
[comment] => Updated At
)

[is_active] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 1
[comment] => Is Active
)

)

[comment] => Customer Entity
)

[magentocustomer_address_entity] => Array
(
[columns] => Array
(
[entity_id] => Array
(
[type] => integer
[identity] => 1
[unsigned] => 1
[nullable] =>
[primary] => 1
[comment] => Entity Id
)

[entity_type_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Type Id
)

[attribute_set_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Attribute Set Id
)

[increment_id] => Array
(
[type] => text
[length] => 50
[comment] => Increment Id
)

[parent_id] => Array
(
[type] => integer
[unsigned] => 1
[comment] => Parent Id
)

[created_at] => Array
(
[type] => timestamp
[nullable] =>
[comment] => Created At
)

[updated_at] => Array
(
[type] => timestamp
[nullable] =>
[comment] => Updated At
)

[is_active] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 1
[comment] => Is Active
)

)

[comment] => Customer Address Entity
)

[magentocustomer_group] => Array
(
[columns] => Array
(
[customer_group_id] => Array
(
[type] => smallint
[identity] => 1
[unsigned] => 1
[nullable] =>
[primary] => 1
[comment] => Customer Group Id
)

[customer_group_code] => Array
(
[type] => text
[length] => 32
[nullable] =>
[comment] => Customer Group Code
)

[tax_class_id] => Array
(
[type] => integer
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Tax Class Id
)

)

[comment] => Customer Group
)

[magentocustomer_eav_attribute] => Array
(
[columns] => Array
(
[attribute_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[primary] => 1
[comment] => Attribute Id
)

[is_visible] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 1
[comment] => Is Visible
)

[input_filter] => Array
(
[type] => text
[length] => 255
[comment] => Input Filter
)

[multiline_count] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 1
[comment] => Multiline Count
)

[validate_rules] => Array
(
[type] => text
[length] => 64K
[comment] => Validate Rules
)

[is_system] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Is System
)

[sort_order] => Array
(
[type] => integer
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Sort Order
)

[data_model] => Array
(
[type] => text
[length] => 255
[comment] => Data Model
)

)

[comment] => Customer Eav Attribute
)

[magentocustomer_eav_attribute_website] => Array
(
[columns] => Array
(
[attribute_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[primary] => 1
[comment] => Attribute Id
)

[website_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[primary] => 1
[comment] => Website Id
)

[is_visible] => Array
(
[type] => smallint
[unsigned] => 1
[comment] => Is Visible
)

[is_required] => Array
(
[type] => smallint
[unsigned] => 1
[comment] => Is Required
)

[default_value] => Array
(
[type] => text
[length] => 64K
[comment] => Default Value
)

[multiline_count] => Array
(
[type] => smallint
[unsigned] => 1
[comment] => Multiline Count
)

)

[comment] => Customer Eav Attribute Website
)

[magentocustomer_form_attribute] => Array
(
[columns] => Array
(
[form_code] => Array
(
[type] => text
[length] => 32
[nullable] =>
[primary] => 1
[comment] => Form Code
)

[attribute_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[primary] => 1
[comment] => Attribute Id
)

)

[comment] => Customer Form Attribute
)

[magentocustomer_address_entity_datetime] => Array
(
[columns] => Array
(
[value_id] => Array
(
[type] => integer
[identity] => 1
[nullable] =>
[primary] => 1
[comment] => Value Id
)

[entity_type_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Type Id
)

[attribute_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Attribute Id
)

[entity_id] => Array
(
[type] => integer
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Id
)

[value] => Array
(
[type] => datetime
[nullable] =>
[default] => 0000-00-00 00:00:00
[comment] => Value
)

)

[comment] => Customer Address Entity Datetime
)

[magentocustomer_address_entity_decimal] => Array
(
[columns] => Array
(
[value_id] => Array
(
[type] => integer
[identity] => 1
[nullable] =>
[primary] => 1
[comment] => Value Id
)

[entity_type_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Type Id
)

[attribute_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Attribute Id
)

[entity_id] => Array
(
[type] => integer
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Id
)

[value] => Array
(
[type] => decimal
[scale] => 4
[precision] => 12
[nullable] =>
[default] => 0.0000
[comment] => Value
)

)

[comment] => Customer Address Entity Decimal
)

[magentocustomer_address_entity_int] => Array
(
[columns] => Array
(
[value_id] => Array
(
[type] => integer
[identity] => 1
[nullable] =>
[primary] => 1
[comment] => Value Id
)

[entity_type_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Type Id
)

[attribute_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Attribute Id
)

[entity_id] => Array
(
[type] => integer
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Id
)

[value] => Array
(
[type] => integer
[nullable] =>
[default] => 0
[comment] => Value
)

)

[comment] => Customer Address Entity Int
)

[magentocustomer_address_entity_text] => Array
(
[columns] => Array
(
[value_id] => Array
(
[type] => integer
[identity] => 1
[nullable] =>
[primary] => 1
[comment] => Value Id
)

[entity_type_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Type Id
)

[attribute_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Attribute Id
)

[entity_id] => Array
(
[type] => integer
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Id
)

[value] => Array
(
[type] => text
[length] => 64K
[nullable] =>
[comment] => Value
)

)

[comment] => Customer Address Entity Text
)

[magentocustomer_address_entity_varchar] => Array
(
[columns] => Array
(
[value_id] => Array
(
[type] => integer
[identity] => 1
[nullable] =>
[primary] => 1
[comment] => Value Id
)

[entity_type_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Type Id
)

[attribute_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Attribute Id
)

[entity_id] => Array
(
[type] => integer
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Id
)

[value] => Array
(
[type] => text
[length] => 255
[comment] => Value
)

)

[comment] => Customer Address Entity Varchar
)

[magentocustomer_entity_datetime] => Array
(
[columns] => Array
(
[value_id] => Array
(
[type] => integer
[identity] => 1
[nullable] =>
[primary] => 1
[comment] => Value Id
)

[entity_type_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Type Id
)

[attribute_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Attribute Id
)

[entity_id] => Array
(
[type] => integer
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Id
)

[value] => Array
(
[type] => datetime
[nullable] =>
[default] => 0000-00-00 00:00:00
[comment] => Value
)

)

[comment] => Customer Entity Datetime
)

[magentocustomer_entity_decimal] => Array
(
[columns] => Array
(
[value_id] => Array
(
[type] => integer
[identity] => 1
[nullable] =>
[primary] => 1
[comment] => Value Id
)

[entity_type_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Type Id
)

[attribute_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Attribute Id
)

[entity_id] => Array
(
[type] => integer
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Id
)

[value] => Array
(
[type] => decimal
[scale] => 4
[precision] => 12
[nullable] =>
[default] => 0.0000
[comment] => Value
)

)

[comment] => Customer Entity Decimal
)

[magentocustomer_entity_int] => Array
(
[columns] => Array
(
[value_id] => Array
(
[type] => integer
[identity] => 1
[nullable] =>
[primary] => 1
[comment] => Value Id
)

[entity_type_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Type Id
)

[attribute_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Attribute Id
)

[entity_id] => Array
(
[type] => integer
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Id
)

[value] => Array
(
[type] => integer
[nullable] =>
[default] => 0
[comment] => Value
)

)

[comment] => Customer Entity Int
)

[magentocustomer_entity_text] => Array
(
[columns] => Array
(
[value_id] => Array
(
[type] => integer
[identity] => 1
[nullable] =>
[primary] => 1
[comment] => Value Id
)

[entity_type_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Type Id
)

[attribute_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Attribute Id
)

[entity_id] => Array
(
[type] => integer
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Id
)

[value] => Array
(
[type] => text
[length] => 64K
[nullable] =>
[comment] => Value
)

)

[comment] => Customer Entity Text
)

[magentocustomer_entity_varchar] => Array
(
[columns] => Array
(
[value_id] => Array
(
[type] => integer
[identity] => 1
[nullable] =>
[primary] => 1
[comment] => Value Id
)

[entity_type_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Type Id
)

[attribute_id] => Array
(
[type] => smallint
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Attribute Id
)

[entity_id] => Array
(
[type] => integer
[unsigned] => 1
[nullable] =>
[default] => 0
[comment] => Entity Id
)

[value] => Array
(
[type] => text
[length] => 255
[comment] => Value
)

)

[comment] => Customer Entity Varchar
)

)

)

)

[10] => Array
(
[file] => /Applications/MAMP/htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 624
[args] => Array
(
[0] => /Applications/MAMP/htdocs/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.5.9.9-

File Attachments
StepstoUpgradeMagento.pdf  (File Size: 233KB - Downloads: 167)
 
Magento Community Magento Community
Magento Community
Magento Community
 
John
Sr. Member
 
Avatar
Total Posts:  129
Joined:  2007-12-20
Sheffield, United Kingdom
 
jam13 - 15 September 2011 11:52 AM

Just encountered exactly the same problem as others on this thread:

“Error in file: “/xxx/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php” - SQLSTATE[HY000]: General error: 1025 Error on rename of ‘./magento/#sql-25de_742’ to ‘./magento/sales_flat_order_item’ (errno: 150)”

I have the same issue - I have worked out that there is an issue with the DB. 

I have a magento 1.4.2 database
I have used to magento DB checker to ensure that it is consistent with the 1.4.2 vanilla DB - came out clean
I extract the SQL query that is causing the issue and run that in phpmyadmin specifically against the 1.4.2 database.

SQL queryALTER TABLE `sales_flat_order_itemDROP INDEX `IDX_STORE_ID`
#1025 - Error on rename of './magento/#sql-a94_107' to './magento/sales_flat_order_item' (errno: 150)

Hay presto I have the same error that I get when I try my 1.6.0.0 upgrade.

So, next I compare the two reference installs that I have made of v1.4.2.0 and v1.6.0.0

I changed the sales_flat_order_item indexes of my 1.4.2.0 site to match the 1.6.0.0 reference site and then run the upgrade and pulled the home page. 

ALTER TABLE sales_flat_order_item DROP INDEX IDX_ORDER ADD INDEX IDX_SALES_FLAT_ORDER_ITEM_ORDER_ID order_id 
ALTER TABLE sales_flat_order_item DROP INDEX IDX_STORE_ID ADD INDEX IDX_SALES_FLAT_ORDER_ITEM_STORE_ID store_id )
ALTER TABLE sales_flat_order_item DROP INDEX IDX_PRODUCT_ID

Completed with no errors - Yeeeerrrhhh.

So can anyone throw stones at this solution then?

Regards
John

 
Magento Community Magento Community
Magento Community
Magento Community
 
raqy
Jr. Member
 
Total Posts:  20
Joined:  2010-01-08
 

Hi guys,
Oddly enough i’ve managed to do this upgrade. i’m quite shocked right now.....

i did clean 1.6 installation (via ftp) with 151 db.

in an act on desperation, as i got the integrity constraint violation error again, i just reload the downloader (with no new db, no cleaning of cache,session, not clearing of local.xml - just really nothing), got another error, reload,got another error, reload.... eventually i was directed to home page which showed nothing (blank page). i reload the homepage, got error, reload, got error, reload.... eventually i was directed again to license page of downloader, server configuration page, had to check ‘don’t validate url’, and then rather quickly to admin account page.... and voila, the site is working.
it even opened showing my custom theme (i fixed it in advance according to diff files).

this is the weirdest thing…

 
Magento Community Magento Community
Magento Community
Magento Community
 
raqy
Jr. Member
 
Total Posts:  20
Joined:  2010-01-08
 

@smg1965
i had the black diamonds stuff. this is a problem of encoding. pls verify that your localization files are saved in utf8 format. that fixed my problem, i had a new file that i mistakenly saved in ansi format.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ladle
Sr. Member
 
Avatar
Total Posts:  175
Joined:  2009-06-11
 

Here’s what worked for us with some help from our host.

Upgrade via magento connect manager, Just mage_all_latest

Visit front of site and hit a 500 error.  Changed index.php from 666 to 644, don’t know why the install set it that way.

Visit from of site and upgrade initiated.  However, forgot to block access from others, so the process kept re-initiating everytime someone hit the site.

Restricted site access through .htaccess to only my ip

connected via ssh, killed all running php scripts, restarted mysql

Revisit frontend, waited 10 minutes, and it completed.

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

I would also say never directly upgrade your live site without testing. It is always best to upgrade a development site that way you don’t run into the problems of customers trying to access you upgrade

 Signature 

Brent W. Peterson
Chief Magento Evangelist for WagentoCreative
==========
Follow me on Twitter @brentwpeterson

**Always remember to backup before trying anything new

 
Magento Community Magento Community
Magento Community
Magento Community
 
ladle
Sr. Member
 
Avatar
Total Posts:  175
Joined:  2009-06-11
 

Brent,

If you’re speaking at me, we always use the maintenance flag when upgrading in combination with the artsonit offline extension so customers can’t hit the site.  The problem, as many report is hitting that 500 error, which is rectified by chaning index.php from 666 to 644, but I made the made the mistake of trying to delete the maintenance flag first.  Then when changing permissions to index.php it was too late, and our production was getting hit by visitors.

And of course, we always test at the dev site first.  I’m actually happy this upgrade went through and was completely ironed out within 3 hours.

 
Magento Community Magento Community
Magento Community
Magento Community
 
justintime67
Sr. Member
 
Avatar
Total Posts:  189
Joined:  2009-08-12
 

Anyone getting the XML data is invalid error message after upgrading to 1.6 and trying to save changes to categories?? Anyone know a fix?

I think it might be related to using this fix for upgrade halt: http://www.gpmd.co.uk/blog/magento-1-6-upgrade-woes/#PageComment_638 but not sure where to go from here

 Signature 

Happy Cow - Belts & Bags For People On The Mooove

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 10 of 12