[wp-trac] [WordPress Trac] #11266: Database upgrade error on wp_options key

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 25 23:42:53 UTC 2009


#11266: Database upgrade error on wp_options key
--------------------------+-------------------------------------------------
 Reporter:  nacin         |       Owner:  ryan
     Type:  defect (bug)  |      Status:  new 
 Priority:  normal        |   Milestone:  2.9 
Component:  Database      |     Version:  2.9 
 Severity:  major         |    Keywords:      
--------------------------+-------------------------------------------------
 Updating to trunk, I got:

 WordPress database error: [Incorrect table definition; there can be only
 one auto column and it must be defined as a key]
 ALTER TABLE wp_options DROP INDEX option_id

 This is the structure of wp_options.

 CREATE TABLE `wp_options` (
   `option_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
   `blog_id` int(11) NOT NULL DEFAULT '0',
   `option_name` varchar(64) NOT NULL DEFAULT '',
   `option_value` longtext NOT NULL,
   `autoload` varchar(20) NOT NULL DEFAULT 'yes',
   PRIMARY KEY (`option_id`),
   UNIQUE KEY `option_name` (`option_name`),
   UNIQUE KEY `autoloaded_options` (`autoload`,`option_name`),
   KEY `option_id` (`option_id`)
 )

 Probably related: #2699, #10994.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11266>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list