Index: head2head.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/head2head/head2head.module,v
retrieving revision 1.16
diff -u -p -r1.16 head2head.module
--- head2head.module	2 Jun 2010 00:46:08 -0000	1.16
+++ head2head.module	4 Jun 2010 18:04:33 -0000
@@ -17,6 +17,47 @@ function head2head_809132() {
 }
 
 /**
+ * Numeric list fields should not be unsigned.
+ *
+ * Note: This function only works for fields stored via the field_sql_storage
+ * module, and assumes that module is enabled. And we cannot use
+ * field_update_field() to perform the updates since field_sql_storage.module
+ * specifically forbids schema updates.
+ */
+function head2head_795198() {
+  // Get all numeric list fields that previously were forced to be unsigned.
+  $fields = array();
+  $types = array('list', 'list_boolean', 'list_number');
+  foreach ($types as $type) {
+    $conditions = array('type' => $type, 'storage_module' => 'field_sql_storage');
+    $fields = array_merge($fields, field_read_fields($conditions, array('include_inactive' => TRUE)));
+  }
+
+  // For each field, build up the list of tables, columns and indexes we will
+  // be updating, and run the update.
+  foreach ($fields as $field) {
+    $tables = array(
+      _field_sql_storage_tablename($field),
+      _field_sql_storage_revision_tablename($field),
+    );
+    $column_name = _field_sql_storage_columnname($field['field_name'], 'value');
+    $index_name = _field_sql_storage_indexname($field['field_name'], 'value');
+    $spec = array(
+      'type' => ($field['type'] == 'list_number' ? 'float' : 'int'),
+      'not null' => FALSE,
+    );
+    foreach ($tables as $table) {
+      // Sometimes certain field database tables don't exist even though the
+      // schema thinks they should, so be paranoid.
+      if (db_table_exists($table)) {
+        db_drop_index($table, $index_name);
+        db_change_field($table, $column_name, $column_name, $spec, array('indexes' => array($index_name => array($column_name))));
+      }
+    }
+  }
+}
+
+/**
  * Taxonomy_tags field renamed to field_tags.
  */
 function head2head_762404() {
Index: alpha2alpha/alpha2alpha.install
===================================================================
RCS file: /cvs/drupal/contributions/modules/head2head/alpha2alpha/alpha2alpha.install,v
retrieving revision 1.5
diff -u -p -r1.5 alpha2alpha.install
--- alpha2alpha/alpha2alpha.install	2 Jun 2010 00:46:08 -0000	1.5
+++ alpha2alpha/alpha2alpha.install	4 Jun 2010 18:04:33 -0000
@@ -144,6 +144,13 @@ function alpha2alpha_update_7600() {
 }
 
 /**
+ * Numeric list fields should not be unsigned.
+ */
+function alpha2alpha_update_7601() {
+  alpha2alpha_update_helper('795198', 6);
+}
+
+/**
  * @} End of "defgroup updates-alpha-5-to-6"
  * The next series of updates should start at 7700.
  */
