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

Fresh install 1.1.5 …Fatal error with existing DB
 
lorenzo01
Sr. Member
 
Avatar
Total Posts:  221
Joined:  2007-09-06
France
 

i’ve got a mysql error on a fresh install with keeping my existing Database......

Error in file"/home/sd/xyz/www/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.10-0.8.11.php" SQLSTATE[HY000]General error1025 Error on rename of './databasetest/design_change' to './databasetest/#sql2-5c99-600e' (errno152)
Trace:
#0 /home/sd/xyz/www/app/code/core/Mage/Core/Model/Resource/Setup.php(286): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/sd/xyz/www/app/code/core/Mage/Core/Model/Resource/Setup.php(178): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '0.8.10', '0.8.11')
#2 /home/sd/xyz/www/app/code/core/Mage/Core/Model/Resource/Setup.php(145): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('0.8.10', '0.8.11')
#3 /home/sd/xyz/www/app/code/core/Mage/Core/Model/Resource/Setup.php(120): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/sd/xyz/www/app/code/core/Mage/Core/Model/Config.php(215): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/sd/xyz/www/app/code/core/Mage/Core/Model/App.php(236): Mage_Core_Model_Config->init(Array)
#6 /home/sd/xyz/www/app/Mage.php(424): Mage_Core_Model_App->init('', 'store', Array)
#7 /home/sd/xyz/www/app/Mage.php(443): Mage::app('', 'store', Array)
#8 /home/sd/xyz/www/index.php(52): Mage::run()
#9 {main}

Anyone have this error ????

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

Yep - the quick fix I found was just to delete the SQL commands in app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.10-0.8.11.php

They must be formatted incorrectly or something.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michae1
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 

Replacing the following lines in app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.10-0.8.11.php :

$installer->run("
ALTER TABLE `{
$installer->getTable('design_change')}` DROP FOREIGN KEY `FK_DESIGN_CHANGE_STORE`;
ALTER TABLE `{
$installer->getTable('design_change')}`
  ADD CONSTRAINT `FK_DESIGN_CHANGE_STORE` FOREIGN KEY (`store_id`) REFERENCES `{
$installer->getTable('core_store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE;
"
);

with

$installer->getConnection()->dropForeignKey($installer->getTable('design_change'), 'FK_DESIGN_CHANGE_STORE');
$installer->getConnection()->addConstraint(
    
'FK_DESIGN_CHANGE_STORE',
    
$installer->getTable('design_change'), 'store_id',
    
$installer->getTable('core_store'),    'store_id'
);

should help as well.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top