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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tbm13’s picture

FileSize
1.9 KB

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.

sun’s picture

Title: Upgrade from 6.x-2.0 to 7.x-2.1 fails because SQL changes are done twice » Upgrade 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
FileSize
5.18 KB

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.

sun’s picture

Status: Needs work » Needs review

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

shashikant_chauhan’s picture

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

sun’s picture

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.

  • Commit b3bb9c9 on 7.x-2.x, 8.x-2.x, fbajs, actions by sun:
    - #1635278 by tbm13, sun: Fixed Upgrade from 6.x-2.x to 7.x-2.x fails...

  • Commit b3bb9c9 on 7.x-2.x, 8.x-2.x, fbajs, actions by sun:
    - #1635278 by tbm13, sun: Fixed Upgrade from 6.x-2.x to 7.x-2.x fails...