[wp-hackers] dbDelta does not update the table

Jennifer Hodgdon yahgrp at poplarware.com
Wed Sep 16 23:20:11 UTC 2009


dbDelta is VERY sensitive to the exact format of your database schema 
-- could that be the problem? Some restrictions are mentioned in 
http://codex.wordpress.org/Creating_Tables_with_Plugins but maybe not 
all. Most have to do with whitespace, such as spaces vs. tabs, and 
maybe even the type of newline character (unix, mac, windows formatted 
file).

So, you may need to look at the code of dbDelta to figure out if it is 
expecting anything else that your code is not getting exactly the way 
dbDelta wants it.

    ---Jennifer

Eddie Ringle wrote:
> Indeed:
> http://github.com/eddieringle/wicketpixie/blob/master/app/adsenseads.php#L33
> 
> On Wed, Sep 16, 2009 at 6:47 PM, John Blackbourn
> <johnbillion+wp at gmail.com<johnbillion%2Bwp at gmail.com>
>> wrote:
> 
>> Can we see some code or a link to the theme?
>>
>> 2009/9/16 Eddie Ringle <eddie at eringle.net>:
>>> My theme recently entered it's third RC, and a common issue people are
>>> having is a modification to the table structure for one of the tables my
>>> theme installs. I followed the Creating Tables in Plugins guide and made
>>> sure to use dbDelta, which as far as I know, should update the table to
>> fit
>>> the new structure. Can anyone tell me why this is not happening? The
>>> modification to the table structure included replacing one column with a
>>> different one, and of a different type.

-- 
Jennifer Hodgdon * Poplar ProductivityWare
www.poplarware.com
Drupal, WordPress, and custom Web programming



More information about the wp-hackers mailing list