I have updated the Password policy module from 6.x-1.0-alpha3 to 6.x-1.0-beta1. On running update.php I get

The following queries were executed
password_policy module
Update #6001

    * CREATE TABLE {password_policy_force_change} ( `uid` INT NOT NULL, `force_change` INT DEFAULT 0, INDEX uid (uid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */
    * INSERT INTO {password_policy_force_change} (uid) SELECT DISTINCT uid FROM {users} WHERE uid > 0

Update #6002

    * ALTER TABLE {password_policy} CHANGE `policy` `policy` VARCHAR(1024) NOT NULL DEFAULT ''
    * Failed: 

Note the last line of the output - "Failed".

CommentFileSizeAuthor
#3 install_borked_1.patch841 bytesafreeman

Comments

roball’s picture

In the dblog I have PHP errors like this:

Table 'drupal_mysite.password_policy_force_change' doesn't exist query: SELECT force_change FROM password_policy_force_change WHERE uid=1  in /etc/drupal/all/modules/password_policy/password_policy.module  on line 226.
afreeman’s picture

Assigned: Unassigned » afreeman
Priority: Minor » Critical

I've duplicated this bug and am working on a fix.

afreeman’s picture

StatusFileSize
new841 bytes

Looks like this is caused by a pass by reference fail in hook_update_6002, entirely my fault.

afreeman’s picture

Status: Active » Needs review
auberdjinn’s picture

The patch worked for me - thankyou!

scubasmurf’s picture

After receiving this error, what do I need to do to go back and fix the problem that is caused?

roball’s picture

Status: Needs review » Reviewed & tested by the community

I did not test the patch myself, but according to reply #5, it should work. Thus changing status, so it hopefully can get committed earlier.

deekayen’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

Status: Fixed » Closed (fixed)

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