Magento - upgrade magento from 1.6.2 to 1.7.0.2

Hi, when I upgrade my magento 1.6.2 to 1.7.0.2, the files update normally ... (I spend it all on my testing server)

I get the same errors when trying to update via diff or magento connect files (update mage_all_latest)

But when I first register with the online store, it tries to update the mysql table.

But I get an error after the error.

Here is a list of errors:

a:5:{i:0;s:237:"Error in file: "/var/www/vhosts/liefstoereigenwijs.nl/site1/app/code/core/Mage/SalesRule/sql/salesrule_setup/upgrade-1.6.0.2-1.6.0.3.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'salesrule_website' already exists";i:1;s:1122:" #0 /var/www/vhosts/liefstoereigenwijs.nl/site1/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...') 

and the same for:

  • catalog_product_entity_group_price
  • salesrule_customer_group
  • report_viewed_product_aggregated_daily
  • report_viewed_product_aggregated_monthly
  • report_viewed_product_aggregated_jearly
  • oauth_consumer

To solve this problem, I deleted these keys. (although this does not seem correct)

But I can’t delete the last key. I get # 1217 - Unable to delete or update parent row: foreign key constraint does not work

Who can tell me what I'm doing wrong ...

UPDATE 01-08-2012

I repaired the database using the reapir magento tool. After that, I updated magento, updating mage_all_latest to 1.7.0.2.

Everything works fine, except that I get: "Exception while clearing cache and session", but there are no other errors when installing.

Then I go back to the admin, I get a white screen. After waiting for a while, I cleared var / cache and apc.

Now I get this message:

 a:5:{i:0;s:255:"Error in file: "/var/www/vhosts/liefstoereigenwijs.nl/site1/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.9-1.6.0.0.10.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'catalog_product_entity_group_price' already exists";i:1;s:1132:" #0 /var/www/vhosts/liefstoereigenwijs.nl/site1/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...') #1 /var/www/vhosts/liefstoereigenwijs.nl/site1/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.6.0.0.8', '1.6.0.0.14') #2 /var/www/vhosts/liefstoereigenwijs.nl/site1/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.6.0.0.8', '1.6.0.0.14') #3 /var/www/vhosts/liefstoereigenwijs.nl/site1/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates() #4 /var/www/vhosts/liefstoereigenwijs.nl/site1/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates() #5 /var/www/vhosts/liefstoereigenwijs.nl/site1/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules() #6 /var/www/vhosts/liefstoereigenwijs.nl/site1/app/Mage.php(683): Mage_Core_Model_App->run(Array) #7 /var/www/vhosts/liefstoereigenwijs.nl/site1/index.php(87): Mage::run('', 'store') #8 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";} 

I notice that after the update, the permissions on the file of a large number of files, for example index.php, were changed to 666.

Who can help me?

+6
source share
1 answer

Based on your setup, it seems that it does not have the DROP TABLE IF EXISTS command preceding it. It actually helps you. I would go to the db server as admin or root and execute the following commands:

 create table catalog_product_entity_group_price_backup like catalog_product_entity_group_price; insert into catalog_product_entity_group_price_backup select * from catalog_product_entity_group_price; drop table catalog_product_entity_group_price; 

This should create everything from the catalog_product_entity_group_price table into a backup and drop it so that Magento can complete the upgrade. After the update is completed, you can compare the two tables and combine the information in - if the table is not structurally different, you can even insert into catalog_product_entity_group_price select * from catalog_product_entity_group_price_backup;

Greetings.

+1
source

Source: https://habr.com/ru/post/921596/


All Articles