Index: head2head.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/head2head/head2head.module,v
retrieving revision 1.39
diff -u -p -r1.39 head2head.module
--- head2head.module	10 Sep 2010 21:34:10 -0000	1.39
+++ head2head.module	15 Sep 2010 21:37:09 -0000
@@ -602,3 +602,33 @@ function head2head_894898() {
   db_add_primary_key('role_permission', array('rid', 'permission'));
   db_add_index('role_permission', 'permission', array('permission'));
 }
+
+/**
+ * Fix the schema versions for modules which had update functions removed.
+ *
+ * Given an array of modules, check if any of them have a schema version in the
+ * database that is higher than the latest schema version currently defined by
+ * the module. (This can happen because during alpha, some module update
+ * functions in core were removed or renumbered.)
+ *
+ * If so, change the schema version to match the latest in the code; that way,
+ * if future update functions are ever added to these modules, they will be
+ * able to actually run.
+ *
+ * @param $modules
+ *   An array of module names to check.
+ */
+function head2head_909338($modules) {
+  $schema_versions = drupal_get_installed_schema_version(NULL, FALSE, TRUE);
+  foreach ($schema_versions as $module => $current_version) {
+    if (in_array($module, $modules) && $current_version != SCHEMA_UNINSTALLED) {
+      $available_versions = drupal_get_schema_versions($module);
+      if (!empty($available_versions)) {
+        $latest_version = max($available_versions);
+        if ($current_version > $latest_version) {
+          drupal_set_installed_schema_version($module, $latest_version);
+        }
+      }
+    }
+  }
+}
Index: alpha2alpha/alpha2alpha.install
===================================================================
RCS file: /cvs/drupal/contributions/modules/head2head/alpha2alpha/alpha2alpha.install,v
retrieving revision 1.25
diff -u -p -r1.25 alpha2alpha.install
--- alpha2alpha/alpha2alpha.install	10 Sep 2010 21:34:10 -0000	1.25
+++ alpha2alpha/alpha2alpha.install	15 Sep 2010 21:37:09 -0000
@@ -79,6 +79,13 @@ function alpha2alpha_enable() {
 
 /**
  * Ensure that only updates necessary for the current alpha version are completed.
+ *
+ * @param $head2head_update
+ *   The number of the head2head helper function to run.
+ * @param $alpha_version
+ *   The version of Drupal 7 alpha that is being updated to.
+ * @param ...
+ *   Any additional arguments to pass to the head2head helper function.
  */
 function alpha2alpha_update_helper($head2head_update, $alpha_version) {
   // Delete any forcibly-set older alpha version.
@@ -88,9 +95,13 @@ function alpha2alpha_update_helper($head
     throw new DrupalUpdateException(t('Not yet on Drupal 7.0-alpha@version.', array('@version' => $alpha_version)));
   }
   else {
-    // Run the head2head update.
+    // Run the head2head update, passing along any additional arguments that
+    // were provided.
+    $args = func_get_args();
+    array_shift($args);
+    array_shift($args);
     $function = 'head2head_' . $head2head_update;
-    $function();
+    call_user_func_array($function, $args);
   }
 }
 
@@ -125,7 +136,7 @@ function alpha2alpha_update_7402() {
  */
 
 /**
- * @defgroup updates-alpha-4-to-5 Drupal updates from 7.0-alpha4 to 7.0-alpha5 (or beta1)
+ * @defgroup updates-alpha-4-to-5 Drupal updates from 7.0-alpha4 to 7.0-alpha5
  * @{
  */
 
@@ -149,7 +160,7 @@ function alpha2alpha_update_7501() {
  */
 
 /**
- * @defgroup updates-alpha-5-to-6 Drupal updates from 7.0-alpha5 to 7.0-alpha6 (or beta1)
+ * @defgroup updates-alpha-5-to-6 Drupal updates from 7.0-alpha5 to 7.0-alpha6
  * @{
  */
 
@@ -270,6 +281,13 @@ function alpha2alpha_update_7708() {
 }
 
 /**
+ * Fix the schema versions for the comment and dblog modules.
+ */
+function alpha2alpha_update_7709() {
+  alpha2alpha_update_helper('909338', 7, array('comment', 'dblog'));
+}
+
+/**
  * @} End of "defgroup updates-alpha-6-to-7"
  * The next series of updates should start at 7800.
  */
