The implementation of hook_update_N() is changed in Drupal 6. It should not call update_sql("ALTER TABLE") to alter table, but it should call different functions. See the details in the documentation.

Comments

Gurpartap Singh’s picture

Status: Active » Closed (won't fix)

That's fine. But the new db functions don't support the "AFTER" bit of:

    $ret[] = update_sql("ALTER TABLE {smileys} ADD promote_to_box TINYINT(1) UNSIGNED NOT NULL DEFAULT '1' AFTER standalone");
avpaderno’s picture

Status: Closed (won't fix) » Active
avpaderno’s picture

Status: Active » Closed (works as designed)
avpaderno’s picture

Category: bug » task
Status: Closed (works as designed) » Active

Usually, in a table the order of the fields doesn't have importance.
Is there a reason to put a field close to another, when the database engine would be able to find it whatever position it has?

I am sorry for the comments I added; I replied to a report thinking to another one.

This is not a bug, so I am changing the category to task.

Gurpartap Singh’s picture

Well actually there's no real reason to use AFTER in the query, rather than being sensible and in sync with the new installations. Although that doesn't matter, yet I am reluctant to make that change, maybe because I'm unable to come out of the "sticky preference nature" that I have developed. If you can provide a patch, I'll commit it with eyes closed (not really) :-)

avpaderno’s picture

It's easier to change the code in this case, than to apply a patch.

Gurpartap Singh’s picture

Status: Active » Closed (works as designed)

Yeah, I'm going to ignore this issue. Not a big deal since I want to stick with my sticky preference. :P