Because we're running super old postgres 7.4, my upgrade to drupal 6.19 did not work because of some unsupported SQL syntax in an upgrade script. This may affect other instances of postgres.

Database upgrade #6051 may in fact belong to an earlier drupal version than 6.19. I don't know how to check that. Here's what happened:

When I run the database upgrade php script to complete the install, item #6051 will fail because it chokes on adding the signature_format field and specifying the default settings in the same ALTER TABLE command. When I ran it, #6051 tried to create new column signature_format in the user table and set it to NOT NULL with a default value of zero. This was done with two commands (ALTER TABLE and an UPDATE) but the ALTER TABLE should be more than one command to parse for postgres.

The way around that is to manually run the following SQL code against the database before you run the upgrade script. This will mean upgrade #6051 will report "No queries" because it detects the changes it wants to make were already done. Here is the SQL for that under postgres:


ALTER TABLE users ADD COLUMN signature_format smallint;
UPDATE users SET signature_format = 1;
ALTER TABLE users ALTER COLUMN signature_format SET DEFAULT;
ALTER TABLE users ALTER COLUMN signature_format SET NOT NULL;

As an aside: Why I would need to have a column that's set to "1" for all users is beyond me. But what the heck... if that's what this update script wants, I'll make it happy.

I'm sorry I'm not a drupal guy and I can only contribute the SQL syntax that will parse, not the patch.

(I don't control the version of postgres on the server I am using. Updating postgres would also fix this problem for me as perhaps more recent versions support adding columns with defaults in one command. I don't know.)

Comments

dww’s picture

Component: update.module » update system

I know it's confusing, but "update.module" is for the part of core (added in 6.x) that checks for available updates to your modules and themes (now called the "Update manager" since it can also install/update your code). You're talking about update.php, which is the "update system" component...

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.