Title: dtek's Replies | WordPress.org

---

# dtek

  [  ](https://wordpress.org/support/users/dtek/)

 *   [Profile](https://wordpress.org/support/users/dtek/)
 *   [Topics Started](https://wordpress.org/support/users/dtek/topics/)
 *   [Replies Created](https://wordpress.org/support/users/dtek/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/dtek/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/dtek/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/dtek/engagements/)
 *   [Favorites](https://wordpress.org/support/users/dtek/favorites/)

 Search replies:

## Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)

 *   Forum: [Installing WordPress](https://wordpress.org/support/forum/installation/)
   
   In reply to: [2.5.1 upgrade error](https://wordpress.org/support/topic/251-upgrade-error/)
 *  [dtek](https://wordpress.org/support/users/dtek/)
 * (@dtek)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/251-upgrade-error/#post-751873)
 * fwiw, i’m still seeing this error on upgrading from 2.6 to 2.6.1. this time i
   realized i cannot duplicate the error on my local dev machine — something about
   my hosting environment…
 * steps taken:
    * clean checkout of WP 2.6.1 from Subversion * run upgrade.php
 * dev environment (no errors):
    * Ubuntu Gutsy * Apache 2.2.4 * PHP 5.2.3 * MySQL
   5.0.45
 * live environment (still seeing error detailed above):
    * FreeBSD 6.2-RELEASE-
   p1 * Apache 2.2.9 * PHP 5.2.4 * MySQL 5.0.41
 *   Forum: [Installing WordPress](https://wordpress.org/support/forum/installation/)
   
   In reply to: [Database error on upgrade to 2.6](https://wordpress.org/support/topic/database-error-on-upgrade-to-26/)
 *  [dtek](https://wordpress.org/support/users/dtek/)
 * (@dtek)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/database-error-on-upgrade-to-26/#post-810256)
 * fyi, we’re discussing this issue in [topic 172244](http://wordpress.org/support/topic/172244),
   too.
 * (the original post there was made after a 2.5.1 upgrade, but i’m seeing the same
   error after the 2.6 upgrade.)
 *   Forum: [Installing WordPress](https://wordpress.org/support/forum/installation/)
   
   In reply to: [2.5.1 upgrade error](https://wordpress.org/support/topic/251-upgrade-error/)
 *  [dtek](https://wordpress.org/support/users/dtek/)
 * (@dtek)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/251-upgrade-error/#post-751851)
 * hmm, the blog in question has been working fine, but i’m seeing this exact same
   error after upgrading from 2.5.1 to 2.6 using svn. very strange… anyone else?
 *   Forum: [Installing WordPress](https://wordpress.org/support/forum/installation/)
   
   In reply to: [2.5.1 upgrade error](https://wordpress.org/support/topic/251-upgrade-error/)
 *  [dtek](https://wordpress.org/support/users/dtek/)
 * (@dtek)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/251-upgrade-error/#post-751665)
 * btw, one thing i noticed in working through this is that my copy of wp-config.
   php was out of date. specifically, the following constants were not defined in
   that file: ‘SECRET_KEY’, ‘DB_CHARSET’, ‘DB_COLLATE’. i guess i’d gotten slack
   in manually watching that file for changes when upgrading from svn.
 * the missing SECRET_KEY value in particular seems that it could have been problematic
   since (i believe) it was added in 2.5 and due to the call to the upgrade_251 
   function in wp-admin/includes/upgrade.php:
    `update_option('secret', wp_generate_password(
   64));`
 * i believe in my testing i tried to add those values to wp-config.php before running
   the upgrade, but by now i’m not sure…
 *   Forum: [Installing WordPress](https://wordpress.org/support/forum/installation/)
   
   In reply to: [2.5.1 upgrade error](https://wordpress.org/support/topic/251-upgrade-error/)
 *  [dtek](https://wordpress.org/support/users/dtek/)
 * (@dtek)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/251-upgrade-error/#post-751664)
 * hmm, i’m poking through wp-admin/includes/upgrade.php . yeah, that’s odd that
   we would see these particular errors… the only instance of ‘type_status_date’
   turned up by grep is in wp-admin/includes/schema.php .
 * i definitely don’t have a second row in the options table with option_name=’db_version’…(
   and the value of that row was updated to 7796 after the 2.5.1 upgrade, as expected.)
 * at this point, i’m willing to let it go unless anyone sees any red flags in the
   index descriptions i posted above. (DaveMc, if you chime back in here, i’d be
   curious how your details compare.)
 *   Forum: [Installing WordPress](https://wordpress.org/support/forum/installation/)
   
   In reply to: [2.5.1 upgrade error](https://wordpress.org/support/topic/251-upgrade-error/)
 *  [dtek](https://wordpress.org/support/users/dtek/)
 * (@dtek)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/251-upgrade-error/#post-751646)
 * thanks, Otto42.
 * out of curiosity, i changed the value of the db_version to 7567, and then 7568
   before running the upgrade again. i still saw the error both times, but i’m willing
   to assume this is safe to ignore at this point. (don’t know the details of how
   the upgrade script checks the version…)
 *   Forum: [Installing WordPress](https://wordpress.org/support/forum/installation/)
   
   In reply to: [2.5.1 upgrade error](https://wordpress.org/support/topic/251-upgrade-error/)
 *  [dtek](https://wordpress.org/support/users/dtek/)
 * (@dtek)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/251-upgrade-error/#post-751643)
 * the only other reference to this error i’ve been able to find is here:
    [http://comox.textdrive.com/pipermail/wp-testers/2008-March/007606.html](http://comox.textdrive.com/pipermail/wp-testers/2008-March/007606.html)
 * the fact that this reporter is describing a “2.5 RC2 to 2.5 RC3” upgrade makes
   me think, like MichaelH mentioned above, that somehow the current version is 
   being reported incorrectly before the upgrade.
 * looking at the upgrade script, it checks the db_version at line 26. looking at
   the options table, my db_version has a value of 7558, while the 2.5 tag in subversion
   is at revision 7567…
 * so the upgrade script is likely trying to upgrade from a pre-2.5 version, when
   in reality the db is already at 2.5. meaning, i think i can ignore this error…
   can anyone give me a sanity check here? specifically, how to be 100% sure (via
   phpmyadmin or CLI compared to the Database Description MichaelH linked above),
   that the db schema is as it should be.
 * looking at the comments table, i see:
 *     ```
       Keyname  	Type  	Cardinality  	Action  	Field
       comment_approved 	INDEX 	1  	Edit 	Drop 	comment_approved 	1
       ```
   
 * looking at the posts table, i see:
 *     ```
       Keyname  	Type  	Cardinality  	Action  	Field
       PRIMARY 	PRIMARY 	59  	Edit 	Drop 	ID
       type_status_date 	INDEX 	59  	Edit 	Drop 	post_type
       							post_status 	1
       							post_date
       							ID
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [error on upgrade to 2.5.1](https://wordpress.org/support/topic/error-on-upgrade-to-251/)
 *  [dtek](https://wordpress.org/support/users/dtek/)
 * (@dtek)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/error-on-upgrade-to-251/#post-752402)
 * just fyi, we’re working on this in [topic 172244](http://wordpress.org/support/topic/172244),
   too.
 *   Forum: [Installing WordPress](https://wordpress.org/support/forum/installation/)
   
   In reply to: [2.5.1 upgrade error](https://wordpress.org/support/topic/251-upgrade-error/)
 *  [dtek](https://wordpress.org/support/users/dtek/)
 * (@dtek)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/251-upgrade-error/#post-751627)
 * i’m seeing the error here, too.
 * i’m running 2.5 under svn w/o problems. if i run upgrade.php i see the normal
   notice that the db is up to date.
 * when i update to 2.5.1 via svn, then run upgrade.php, i see the same error DaveMc
   posted above:
 * >  WordPress database error Duplicate key name ‘comment_approved’ for query ALTER
   > TABLE comments ADD KEY comment_approved (comment_approved) made by dbDelta 
   > WordPress database error Duplicate key name ‘type_status_date’ for query ALTER
   > TABLE posts ADD KEY type_status_date (post_type,post_status,post_date,ID) made
   > by dbDelta
   > Upgrade Complete
   > Your WordPress database has been successfully upgraded!
 * i rolled back to 2.5, checked and repaired all db tables, retried the upgrade,
   and see the same results.
 * i can see the keys mentioned in the error messages both before and after the 
   attempted 2.5.1 upgrade.
 * hmm…

Viewing 9 replies - 1 through 9 (of 9 total)