Magento Upgrading: table already exists
Upgrading from 1.3.x to the latest Magento branch 1.4.1.1
After seeing a screen flash with some PDO object dumps, and the error reporting screen displaying I got quick with hitting escape on reloads to see what was showing and found:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘cataloginventory_stock_status_idx’ already exists
Edit:
/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.6-0.7.7.php
Add the following above the create tables:
DROP TABLE IF EXISTS {$this->getTable('cataloginventory_stock_status_idx')};
DROP TABLE IF EXISTS {$this->getTable('cataloginventory_stock_status_tmp')};
For some reason this was failing when upgrading:
DROP TABLE IF EXISTS `{$installer->getTable('cataloginventory/stock_status')}_idx`;
As this conditioning already exists but wasn’t working properly for me.
I also just added the _tmp table for consistencies sake.
Fooman’s speedster module was installed as well causing the Frontend to be blank and the Admin to appear broken, if you have this installed, disable it until your done upgrading and then re-enable it.
Edit:
/app/etc/modules/Fooman_Speedster.xml and set
<enable>true</enable>
to false.
Reload the admin and setup indexes as well as re-enable cache.
As with all upgrades, backup, backup, BACKUP before proceeding!
Possibly Related Posts:
- Getting Started with Magento
- Magento vs X-Cart
- Magento version 2.0 (X.Commerce) and eBay
- Magento Supercharged Development Tools and Links
- Book Review: Magento 1.4 Themes Design by PacktLib
06Oct2010








