[wp-hackers] dbDelta does not update the table

Eddie Ringle eddie at eringle.net
Wed Sep 30 01:29:23 UTC 2009


Just replying because I hate it when I Google around for an answer and end
up with an unfinished topic. I decided to dump dbDelta and just run an ALTER
query.
Eddie Ringle
eddie at eringle.net
http://eddieringle.com/


On Wed, Sep 16, 2009 at 8:02 PM, Eddie Ringle <eddie at eringle.net> wrote:

> Perhaps it was the VARCHAR lines where VARCHAR wasn't being capitalized?
> Eddie Ringle
> eddie at eringle.net
> http://eddieringle.com/
>
>
>
> On Wed, Sep 16, 2009 at 7:20 PM, Jennifer Hodgdon <yahgrp at poplarware.com>wrote:
>
>> 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><
>>> johnbillion%2Bwp at gmail.com <johnbillion%252Bwp 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
>>
>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>
>


More information about the wp-hackers mailing list