1

I am trying to upgrade to 1.9.2.2 from 1.9.2.1 through Magento Downloader. On the screen at the bottom, I am getting the error message below:

Exception during cache and session cleaning: Error in file: "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 'mage_permission_variable' already exists, query was: CREATE TABLE `mage_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_MAGE_PERMISSION_VARIABLE_VARIABLE_NAME` (`variable_name`) ) COMMENT='System variables that can be processed via content filter' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci.........................

It repeats this quite a few times and then just stays there and the website is broken.

I'm not at all technical with Magento - could someone help me diagnose what's wrong and how I fix it (in as simple steps as possible!)?

2
  • 1
    I saw another post and if I delete 'upgrade-1.6.1.1-1.6.1.2.php' then everything appears to work. Is it OK to just delete this file or will it cause me problems in the future?
    – user32880
    Nov 6, 2015 at 19:57
  • i think you already had applied patch-6788 that creates variable and permissions block. So do not delete the file just comment out that sql code and run setup. After successful run uncomment code. Sep 9, 2016 at 5:37

2 Answers 2

0

That means you already have the mage_permission_variable table in your database.
Don't delete the file instead of you can drop mage_permission_variable and mage_permission_block table then continue you upgrading process

it will do the trick....

Don't forget to backup the database before dropping those tables

Hope it helps

1
  • 2
    These tables are from a previous patch the OP has maybe installed. The tables might have some custom values - I mean, at least the mage_permission_block table will have entries. He should not simply drop them, because blocks that are not in the default configuration will miss from the frontend. Apr 13, 2017 at 22:25
0

Please comment the code which create the db table mage_permission_variable in file upgrade-1.6.1.1-1.6.1.2.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.