upgrade.php log:

phpass module
Update #6200

ALTER TABLE {users} RENAME "pass" TO "pass_old"
ALTER TABLE {users} ADD COLUMN pass varchar(128) default ''
UPDATE {users} SET pass = CAST(pass_old AS varchar)
ALTER TABLE {users} ALTER pass SET NOT NULL
ALTER TABLE {users} DROP COLUMN pass_old
Failed: UPDATE {users} u SET u.pass = (SELECT up.hash FROM {user_phpass} up WHERE up.uid = u.uid) WHERE EXISTS (SELECT up.hash FROM {user_phpass} up WHERE up.uid = u.uid)
DROP TABLE {user_phpass}

warning: pg_query() [function.pg-query]: Query failed: ERROR: column "u" of relation "users" does not exist LINE 1: UPDATE users u SET u.pass = (SELECT up.hash FROM user_phpass...

Failure due to table alias included in set clause parameter.
Correct update query should be as follows:

UPDATE users u SET pass = (SELECT up.hash FROM user_phpass up WHERE up.uid = u.uid) WHERE EXISTS (SELECT up.hash FROM user_phpass up WHERE up.uid = u.uid)

CommentFileSizeAuthor
#1 1354182-1.patch904 bytespwolanin

Comments

pwolanin’s picture

Status: Active » Needs review
StatusFileSize
new904 bytes

like so?

greggles’s picture

Tagging in the hopes of a review.

damienmckenna’s picture

+1 for MySQL compatibility, though we really (obviously) need someone with PGSQL to review it too.

pwolanin’s picture

This only affects the 1.0 branch upgrade, which rarely matters now. I'm happy to commit since I don't see why the change would break anything on mysql?

pwolanin’s picture

Version: 6.x-2.0-rc1 » 6.x-2.x-dev
Status: Needs review » Fixed

committed to 6.x-2.x and 5.x-2.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

liam morland’s picture

Issue tags: +PostgreSQL

Tagging