[wp-trac] [WordPress Trac] #10693: Bug in dbDelta

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 27 10:59:19 UTC 2009


#10693: Bug in dbDelta
--------------------------+-------------------------------------------------
 Reporter:  arena         |       Owner:  ryan 
     Type:  defect (bug)  |      Status:  new  
 Priority:  high          |   Milestone:  2.8.5
Component:  Database      |     Version:       
 Severity:  major         |    Keywords:       
--------------------------+-------------------------------------------------
 Once i created a table for a plugin.

 Then i updated the plugin, modifying, adding and changing the order of the
 columns (just for code readability, as no effect on how the table is
 created) in the CREATE TABLE.

 This last point resulted in a misinterpretation of what i intended to do
 by dbDelta code.

 When the columns of the table to update are not in the same order than the
 original table,
 dbDelta :

 * considers it is a new column,
 * generates a (ALTER TABLE ... ADD COLUMN ...) instead of a (ALTER TABLE
 ... CHANGE COLUMN ...)
 * should return an error but can't get the caller (2.8.4)

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


More information about the wp-trac mailing list