Hi
Have just updated Magento CE test site from V1.9.2.0 to V1.9.2.2 using Cpanel Installatron and get the following error:-
Error in file: "/home/applianc/public_html/dev2/app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.1.1-1.6.1.2.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'permission_variable' already exists, query was: CREATE TABLE `permission_variable` (
`variable_id` int UNSIGNED NOT NULL auto_increment COMMENT 'Variable ID' ,
`variable_name` varchar(255) NOT NULL default '' COMMENT 'Config Path' ,
`is_allowed` bool NOT NULL default '0' COMMENT 'Mark that config can be processed by filters' ,
PRIMARY KEY (`variable_id`, `variable_name`),
UNIQUE `UNQ_PERMISSION_VARIABLE_VARIABLE_NAME` (`variable_name`)
) COMMENT='System variables that can be processed via content filter' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci
Trace:
#0 /home/applianc/public_html/dev2/app/code/core/Mage/Core/Model/Resource/Setup.php(644): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/applianc/public_html/dev2/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.6.1.1', '1.6.1.2')
#2 /home/applianc/public_html/dev2/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.6.1.1', '1.6.1.2')
#3 /home/applianc/public_html/dev2/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/applianc/public_html/dev2/app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/applianc/public_html/dev2/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules()
#6 /home/applianc/public_html/dev2/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 /home/applianc/public_html/dev2/index.php(83): Mage::run('', 'store')
#8 {main}
Can anyone shed any light on this matter,
kind regards
Nick
It looks like the Table "permission_variable" already exists in your database and when the SQL upgrade .sql file executes it generates this error.
Maybe take a look in upgrade-1.6.1.1-1.6.1.2.php and see if all these database changes have been already applied to your database.
It looks like this upgrade is adding:
permission_variable
permission_block
to the database.
If these already exist you can try setting the database version to whatever the upgrade file wants and the .sql update file should stop executing. The error will go away.
I'm not sure if this is the best way to fix this but it's similar to a problem I had recently.