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.

CommentFileSizeAuthor
sequence_update.patch677 byteshunmonk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hunmonk’s picture

btw, i tested this update on postgres, and it works.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Sorry. I need to learn db_change_field -- hoped it does autoup -- but not yet -- thanks for the fix.

ChrisKennedy’s picture

I think you meant to do db_update_field() - http://api.drupal.org/api/HEAD/function/db_update_field

Dries’s picture

Chris: are you suggesting this is the wrong patch?

yched’s picture

No, 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.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)