2012-07-29 119 views
6

嗨,当我更新我的Magento 1.6.2至1.7.0.2中的文件更新工作细... (我都在我的TESTSERVER trieing本)Magento的 - 从1.6.2升级到Magento的1.7.0.2

我试图通过diff文件或magento连接更新时出现同样的错误(更新mage_all_latest)

但是,当我第一次在网上商店登录时,它试图更新mysql表。

但是我得到错误后错误。

这里的错误列表:

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: ...') 

与同为:

  • 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

为了解决这个问题我删除这些注册表项。 (虽然这看起来不对)

但最后一个键我不能删除。我得到#1217 - 无法删除或更新父行,外键约束失败

谁能告诉我什么,我做错了......

UPDATE 2012-08-01

我使用magento的reapir工具修复了数据库。 之后,我通过将mage_all_latest更新为1.7.0.2来更新magento。

所有工作正常,除了最后我得到: “缓存和会话清理期间的异常”,但在安装过程中没有其他错误。

然后我回到管理员我得到一个白色的屏幕。 等了一会儿,我清除了var/cache和apc。

现在,我得到这个消息:

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";} 

我注意到,提升了不少的文件的文件权限后发生了变化,像的index.php改为666

谁能帮我?

+0

根据您的错误消息,表“salesrule_website”已存在。删除外键不会解决您的问题,它会产生更多问题。您应该首先使用此工具修复您的数据库http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/db-repair-tool。 – 2012-07-29 10:07:23

+0

其他点,如果您已经运行更新过程,它已经在数据库中创建了“salesrule_website”表。这意味着如果它没有任何内容,则可能需要手动将其删除,否则从数据库备份开始并启动更新过程。 – 2012-07-29 10:10:32

+0

http://duntuk.com/magento-upgrade – 2014-03-11 04:55:51

回答

1

根据您的安装,似乎它在它之前没有DROP TABLE IF EXISTS命令。这实际上对你有帮助。我会登录到数据库服务器管理员或根并执行以下命令:

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; 

这应该创造一切从catalog_product_entity_group_price表到备份,并把它使Magento的可以完成升级。升级完成后,您可以比较两个表并合并信息 - 如果表格结构不同,您甚至可以执行insert into catalog_product_entity_group_price select * from catalog_product_entity_group_price_backup;

干杯。

+0

这不是解决方案。在这一行之后,它会搜索下一个...'如果退出'表可能会工作。但我不知道把它放在文件中。也许你可以看看我。这里是文件:[链接](http://www.phpkode.com/source/p/magento/magento/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.9-1.6 .0.0.10.php) – Ronny 2012-08-05 07:33:19