Index: mollom.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.install,v
retrieving revision 1.33
diff -u -p -r1.33 mollom.install
--- mollom.install	16 Oct 2010 18:00:29 -0000	1.33
+++ mollom.install	8 Dec 2010 12:04:08 -0000
@@ -713,26 +713,27 @@ function mollom_update_7007() {
     }
   }
   // If {mollom}.form_id already exists, only update 'comment_form' form_ids.
+  // Also, in this case, {mollom}.did has been renamed to .id already.
   else {
     $query = db_select('mollom', 'm');
-    $query->join('comment', 'c', 'c.cid = m.did');
+    $query->join('comment', 'c', 'c.cid = m.id');
     $query->join('node', 'n', 'n.nid = c.nid');
     $result = $query
       ->fields('n', array('type'))
-      ->fields('m', array('did'))
+      ->fields('m', array('id'))
       ->condition('m.entity', 'comment')
       ->condition('m.form_id', 'comment_form')
       ->execute()
       ->fetchAll();
     $ids = array();
     foreach ($result as $row) {
-      $ids[$row->type][] = $row->did;
+      $ids[$row->type][] = $row->id;
     }
     foreach ($ids as $type => $cids) {
       db_update('mollom')
         ->fields(array('form_id' => "comment_node_{$type}_form"))
         ->condition('entity', 'comment')
-        ->condition('did', $cids)
+        ->condition('id', $cids)
         ->execute();
     }
   }
