[wp-trac] [WordPress Trac] #2695: dbdelta duplicates indices instead of overwriting them.

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 26 03:47:42 GMT 2006


#2695: dbdelta duplicates indices instead of overwriting them.
----------------------------+-----------------------------------------------
       Id:  2695            |      Status:  new                     
Component:  Administration  |    Modified:  Wed Apr 26 03:47:42 2006
 Severity:  normal          |   Milestone:  2.1                     
 Priority:  normal          |     Version:  2.0.2                   
    Owner:  anonymous       |    Reporter:  majelbstoat             
----------------------------+-----------------------------------------------
 When using dbdelta to upgrade a plugin's tables, any UNIQUE keys on that
 table are duplicated, because they are added without being removed first.
 This seems to occur when the table structure is changed in some way, even
 when the SQL is identical to that outputted by phpMyAdmin.

 http://comox.textdrive.com/pipermail/wp-hackers/2006-April/006046.html for
 the original discussion.

 I also had a problem where dbdelta tries to duplicate multiple primary
 keys as well.  I'll do some more testing on this and see if I can narrow
 down the cause.

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


More information about the wp-trac mailing list