Base table or view already exists: 1050 Table 'mage_core_email_queue' already exists after upgrade from 1.9.0.1 to 1.9.1.0.
Full stack trace as below
/public_html/temp/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php" - SQLSTATE[42S01]:
Base table or view already exists: 1050 Table 'mage_core_email_queue' already exists, query was: CREATE TABLE `mage_core_email_queue` (
`message_id` int
UNSIGNED NOT NULL auto_increment COMMENT 'Message Id' ,
`entity_id` int UNSIGNED NULL COMMENT 'Entity ID' ,
`entity_type` varchar(128) NULL COMMENT 'Entity
Type' ,
`event_type` varchar(128) NULL COMMENT 'Event Type' ,
`message_body_hash` varchar(64) NOT NULL COMMENT 'Message Body Hash' ,
`message_body`
mediumtext NOT NULL COMMENT 'Message Body' ,
`message_parameters` text NOT NULL COMMENT 'Message Parameters' ,
`created_at` timestamp NULL default NULL
COMMENT 'Creation Time' ,
`processed_at` timestamp NULL default NULL COMMENT 'Finish Time' ,
PRIMARY KEY (`message_id`),
INDEX
`747D3AF379628D00D009E037E2942C80` (`entity_id`, `entity_type`, `event_type`, `message_body_hash`)
) COMMENT='Email Queue' ENGINE=INNODB charset=utf8
COLLATE=utf8_general_ci";i:1;s:1058:"#0
Reason
The reason is clearly stated in log that table "mage_core_email_queue" alreay exist,
Resolution:
I gone through the file located in "/mydomain/app/code/core/Mage/Core/sql/core_setup/" upgrade-1.6.0.5-1.6.0.6.php and reconcile current table structure of mage_core_email_queue and the one given in file upgrade-1.6.0.5-1.6.0.6.php and found already exists.
Delete file "/mydomain/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php" will solve the issue.
Note; there is another table in this file with the name mage_core_email_recipients, reconcile it with your existing database as well if the same with your existing schema so there is no need of upgrade-1.6.0.5-1.6.0.6.php file at all.
You are strongly encourage to backup upgrade-1.6.0.5-1.6.0.6.php before deleting it.
Thank you for sharing excellent information. Your website is very cool. Fully useful your blog post... Online Shopping Websites In India
ReplyDelete