Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
instead of making a few small adjustments to the columns it's addressing, this update instead wipes out the columns completely, and throws in a few failed queries to boot... ;)
attached patch corrects.
Comment | File | Size | Author |
---|---|---|---|
sequence_update.patch | 677 bytes | hunmonk | |
Comments
Comment #1
hunmonk CreditAttribution: hunmonk commentedbtw, i tested this update on postgres, and it works.
Comment #2
chx CreditAttribution: chx commentedSorry. I need to learn db_change_field -- hoped it does autoup -- but not yet -- thanks for the fix.
Comment #3
ChrisKennedy CreditAttribution: ChrisKennedy commentedI think you meant to do db_update_field() - http://api.drupal.org/api/HEAD/function/db_update_field
Comment #4
Dries CreditAttribution: Dries commentedChris: are you suggesting this is the wrong patch?
Comment #5
yched CreditAttribution: yched commentedNo, hummonk's patch is the right one - you cannot simply tell 'update this column to its current schema definition' in an update function, for by the time the update function is run, the general schema can be different from what it was when the update was written. Bjaspan explains this better than I do.
In short : in update functions, you have to explicitly state the settings for new / updated columns; That is : use db_change_field rather than db_update_field.
Comment #6
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #7
(not verified) CreditAttribution: commented