Search code examples
phpmysqlmagentoinstallationmagento-1.6

Magento wants to reinstall after migration


In the last days I moved a Magento installation over a new staging server and a new production server. Everything went well on the production server, where the site is back againg, but I'm not able to make it work on the staging server... It keeps saying that the table "admin_assert" is already present (mysql error) and the error comes from the install script... but I don't want another install.

How's it possible that magento is trying to perform an installation over another preconfigured base?

I moved the whole base (source code), without performing a clean install, then I dumped the DB and changed the base urls.

Do you have any idea?

FYI this is the whole error log:

a:5:{i:0;s:193:"Error in file:  "/home/lex/code/mycommerce/app/code/core/Mage/Admin/sql/admin_setup/install-1.6.0.0.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'admin_assert' already exists";i:1;s:920:"#0 /home/lex/code/mycommerce/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/lex/code/mycommerce/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.1.0')
#2 /home/lex/code/mycommerce/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('1.6.1.0')
#3 /home/lex/code/mycommerce/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/lex/code/mycommerce/app/code/core/Mage/Core/Model/App.php(412): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/lex/code/mycommerce/app/code/core/Mage/Core/Model/App.php(338): Mage_Core_Model_App->_initModules()
#6 /home/lex/code/mycommerce/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#7 /home/lex/code/mycommerce/index.php(90): Mage::run('', 'store')
#8 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

Solution

  • Not a big deal. You will find many more errors like this.

    The error simple says your DB already has table name admin_assert.

    You can ignore this by opening the install script and comment out the code which tries to re-create the table, and refresh the magento again.

    Once everything is set up properly, don't forget to uncomment the commented create table script.