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

1.1.4 -> 1.1.5 = PDOException Object
 
malbiniak
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-26
Saint Paul, MN
 

i’m way too green with magento to even know where to start. tried upgrading through the admin backend, then tried through the pear updater. both gave me these same nasties:

PDOException Object
(
[message:protected] => SQLSTATE[HY000]General error1025 Error on rename of './r29_mag_dev/design_change' to './r29_mag_dev/#sql2-1e81-c3a1' (errno152)
[string:private] =>
[code:protected] => HY000
[file
:protected] => /var/www/vhosts/r29dev.com/httpdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line
:protected] => 156
[trace
:private] => Array
(
[0] => Array
(
[file] => /var/www/vhosts/r29dev.com/httpdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] 
=> 156
[function] 
=> query
[class] 
=> PDO
[type] 
=> ->
[args] => Array
(
[0] => ALTER TABLE `design_changeDROP FOREIGN KEY `FK_DESIGN_CHANGE_STORE`
)
)
[1] => Array
(
[file] => /var/www/vhosts/r29dev.com/httpdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] 
=> 218
[function] 
=> raw_query
[class] 
=> Varien_Db_Adapter_Pdo_Mysql
[type] 
=> ->
[args] => Array
(
[0] => ALTER TABLE `design_changeDROP FOREIGN KEY `FK_DESIGN_CHANGE_STORE`
)
)
[2] => Array
(
[file] => /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] 
=> 493
[function] 
=> multi_query
[class] 
=> Varien_Db_Adapter_Pdo_Mysql
[type] 
=> ->
[args] => Array
(
[0] =>
ALTER TABLE `design_changeDROP FOREIGN KEY `FK_DESIGN_CHANGE_STORE`;
ALTER TABLE `design_change`
ADD CONSTRAINT `FK_DESIGN_CHANGE_STOREFOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE;
)
)
[3] => Array
(
[file] => /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.10-0.8.11.php
[line] 
=> 36
[function] 
=> run
[class] 
=> Mage_Core_Model_Resource_Setup
[type] 
=> ->
[args] => Array
(
[0] =>
ALTER TABLE `design_changeDROP FOREIGN KEY `FK_DESIGN_CHANGE_STORE`;
ALTER TABLE `design_change`
ADD CONSTRAINT `FK_DESIGN_CHANGE_STOREFOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE;
)
)
[4] => Array
(
[file] => /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] 
=> 268
[args] 
=> Array
(
[0] => /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.10-0.8.11.php
)
[function] => include
)
[5] => Array
(
[file] => /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] 
=> 178
[function] 
=> _modifyResourceDb
[class] 
=> Mage_Core_Model_Resource_Setup
[type] 
=> ->
[args] => Array
(
[0] => upgrade
[1] 
=> 0.8.8
[2] 
=> 0.8.11
)
)
[6] => Array
(
[file] => /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] 
=> 145
[function] 
=> _upgradeResourceDb
[class] 
=> Mage_Core_Model_Resource_Setup
[type] 
=> ->
[args] => Array
(
[0] => 0.8.8
[1] 
=> 0.8.11
)
)
[7] => Array
(
[file] => /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] 
=> 120
[function] 
=> applyUpdates
[class] 
=> Mage_Core_Model_Resource_Setup
[type] 
=> ->
[args] => Array
(
)
)
[8] => Array
(
[file] => /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/Model/Config.php
[line] 
=> 215
[function] 
=> applyAllUpdates
[class] 
=> Mage_Core_Model_Resource_Setup
[type] 
=> ::
[args] => Array
(
)
)
[9] => Array
(
[file] => /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/Model/App.php
[line] 
=> 236
[function] 
=> init
[class] 
=> Mage_Core_Model_Config
[type] 
=> ->
[args] => Array
(
[0] => Array
(
)
)
)
[10] => Array
(
[file] => /var/www/vhosts/r29dev.com/httpdocs/app/Mage.php
[line] 
=> 424
[function] 
=> init
[class] 
=> Mage_Core_Model_App
[type] 
=> ->
[args] => Array
(
[0] =>
[1] => store
[2] 
=> Array
(
)
)
)
[11] => Array
(
[file] => /var/www/vhosts/r29dev.com/httpdocs/app/Mage.php
[line] 
=> 443
[function] 
=> app
[class] 
=> Mage
[type] 
=> ::
[args] => Array
(
[0] =>
[1] => store
[2] 
=> Array
(
)
)
)
[12] => Array
(
[file] => /var/www/vhosts/r29dev.com/httpdocs/index.php
[line] 
=> 46
[function] 
=> run
[class] 
=> Mage
[type] 
=> ::
[args] => Array
(
)
)
)
[errorInfo] => Array
(
[0] => HY000
[1] 
=> 1025
[2] 
=> Error on rename of './r29_mag_dev/design_change' to './r29_mag_dev/#sql2-1e81-c3a1' (errno152)
)
)
Error in file"/var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.10-0.8.11.php" SQLSTATE[HY000]General error1025 #0 /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(286): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(178): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '0.8.8', #2 /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(145): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('0.8.8', '0.8.11')
#3 /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(120): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/Model/Config.php(215): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /var/www/vhosts/r29dev.com/httpdocs/app/code/core/Mage/Core/Model/App.php(236): Mage_Core_Model_Config->init(Array)
#6 /var/www/vhosts/r29dev.com/httpdocs/app/Mage.php(424): Mage_Core_Model_App->init('', 'store', Array)
#7 /var/www/vhosts/r29dev.com/httpdocs/app/Mage.php(443): Mage::app('', 'store', Array)
#8 /var/www/vhosts/r29dev.com/httpdocs/index.php(46): Mage::run()
#9 {main}
 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael_1
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.

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