I just upgraded from 5.x-1.10 to 5.x-2.0rc1, and I get the following errors when running update.php:

* user warning: Duplicate entry '' for key 1 query: ALTER TABLE temporary_invitation ADD COLUMN passcode_md5 char(32) NOT NULL FIRST, DROP PRIMARY KEY, ADD PRIMARY KEY (passcode_md5) in [path]/includes/database.mysql.inc on line 172.
* user warning: Unknown column 't.passcode_md5' in 'field list' query: UPDATE temporary_invitation t, loginticket l SET t.passcode_md5 = l.passcode_md5 WHERE t.invited_uid = l.uid in [path]/includes/database.mysql.inc on line 172.
* user warning: Duplicate entry '2' for key 1 query: ALTER TABLE temporary_invitation DROP COLUMN invited_uid in [path]/includes/database.mysql.inc on line 172.

Any ideas what's wrong?

Comments

jpetso’s picture

Status: Active » Fixed

Argh! I shouldn't try to restructure stuff that had already been working before.

Of course, I can't make the passcode_md5 column a primary key if it hasn't been filled with (unique) data before, as every row contains an empty string at first. Sorry for the unnessary bug, I hope you executed this on your test server rather than the productive one. (It's a release candidate only, after all.) Please try the rc2 release that should fix this bug. I haven't tested it (it's getting late today, you know) but with a little luck the update procedure should work now.

That is, if it didn't mess up your database with this. The easiest way would probably be to uninstall and re-enable the module, or to roll back to your most recent backup with 1.x. Which is kinda painful, please accept my apologies for causing this kind of inconvenience. Getting upgrades right is not the easiest task in Drupal development.

eagereyes’s picture

Thanks for the quick response! I finally got around to updating, and it worked great. I didn't have an urgent need for the module when I updated, so it wasn't a big problem then. But thanks for fixing it!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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