Our blog
Magento Install Problem + Solution ‘sales_flat_quote’ already exists
Trying to do a clean install of Magento 1.2.1.2 I kept hitting this SQL error.
Base table or view already exists: 1050 Table 'sales_flat_quote' already exists
In the end I opted to manually edit the related install file and add DELETE IF EXISTS statements before each CREATE TABLE statement.
The file in question is located here:
/app/code/core/Mage/Sales/sql/sales_setup
and the problem file is
mysql4-install-0.9.0.php
The solution is to edit the file and add DROP TABLE IF EXISTS statements before each CREATE TABLE statement
eg
-
DROP TABLE IF EXISTS `{$installer->getTable('sales_flat_quote')}`;
-
-
CREATE TABLE `{$installer->getTable('sales_flat_quote')}` (.....
I have created an issue on their bug tracker here.
More...
Zee's Blog » Magento Install for Impatient
Magento - the newest e-commerce package to hit the market ...
Ina Code Blog » Blog Archive » Magento speed problem
Casual Commerce » Magento Notes - Fix for admin login problem
More Reading:
4 Comments
|
That's how it was before 1.0 - the problem with that was dropping and re-creating the whole database on weird mysql server glitch that wouldn't show core_resource table as existing. Besides, the install-*.php scripts suppose to work ONLY when the module is not installed yet. If there are already module tables in database, means there's something wrong and it is safer to involve a human. |
|
onionlips May 26th, 2009 |
After several frustrating hours to debug -- This worked for me. Regardless of the right or wrong way to do it -- Thank you! |
|
Vier July 29th, 2010 |
Man, you saved my life. I don't know what the hell I did while installing an extension but I had errors on sales_flat_order, and after including your piece of code the website came back to life, so I'm very grateful to you Thanks! |
|
Alex September 22nd, 2010 |
Hello, I have a problem with my magento website Error in file: "/homez.361/comunpix/www/paiement/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-1.3.99-1.4.0.0.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'sales_flat_order_grid' already exists Trace: I'm test your solution but ... Thanks |
RSS Feed
Unirgy
March 10th, 2009