I just migrated from Drupal 6 to 7. I had 6.x-2.0 on my system and upgraded to 7.x-2.1. This upgrade failed because 7.x-2.1 tries to make several changes to the SQL db structure that were already made when I updated to 6.x-2.0.

I got:

Failed: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'quality' in 'where clause': UPDATE {mollom} SET quality=:db_update_placeholder_0 WHERE (quality = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => 9 [:db_condition_placeholder_0] => ) in mollom_update_7005() (line 612 of /sites/all/modules/mollom/mollom.install).

mollom_update_6200 does: Change 'quality' into 'qualityScore' double.
but 7005 tries to make the same change again.

Furthermore, this one:
* Change {mollom}: Add 'spamResult', change 'spam', replace 'session_id' with 'contentId' and 'captchaId'.
*/

is done by mollom_update_6200 and mollom_update_7200, again leading to an error.

Files: 
CommentFileSizeAuthor
#2 mollom.2.x-upgrade.2.patch5.18 KBsun
PASSED: [[SimpleTest]]: [MySQL] 4,245 pass(es).
[ View ]
#1 mollom-skip-upgrade.patch1.9 KBtbm13
FAILED: [[SimpleTest]]: [MySQL] 4,244 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Comments

StatusFileSize
new1.9 KB
FAILED: [[SimpleTest]]: [MySQL] 4,244 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

The patch below is the workaround I used; it simply comments out all changes that failed for me... obviously, this is no real patch but it will show you where the problem is.

Title:Upgrade from 6.x-2.0 to 7.x-2.1 fails because SQL changes are done twiceUpgrade from 6.x-2.x to 7.x-2.x fails because SQL changes are done twice
Version:7.x-2.1» 7.x-2.x-dev
Status:Active» Needs review
StatusFileSize
new5.18 KB
PASSED: [[SimpleTest]]: [MySQL] 4,245 pass(es).
[ View ]

Thanks for testing and reporting!

I think that attached patch should resolve this issue. Do you happen to be in a position to test again?

Status:Needs review» Needs work

The last submitted patch, mollom.2.x-upgrade.2.patch, failed testing.

Status:Needs work» Needs review

#2: mollom.2.x-upgrade.2.patch queued for re-testing.

Thanks sun
I was also getting the same error
but your patch "mollom.2.x-upgrade.2.patch" worked for me.

Status:Needs review» Fixed

Excellent!

Thanks for reporting, reviewing, and testing! Committed to 7.x-2.x branch.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status:Fixed» Closed (fixed)

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