Index: mass_contact.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mass_contact/mass_contact.install,v
retrieving revision 1.5.2.3
diff -u -r1.5.2.3 mass_contact.install
--- mass_contact.install	18 Aug 2009 17:07:25 -0000	1.5.2.3
+++ mass_contact.install	24 Feb 2010 02:56:13 -0000
@@ -42,14 +42,14 @@
         'size' => 'tiny',
         'unsigned' => FALSE,
         'not null' => TRUE,
-        'default' => '0'),
+        'default' => 0),
       'selected' => array(
         'description' => t('.'),
         'type' => 'int',
         'size' => 'tiny',
         'unsigned' => FALSE,
         'not null' => TRUE,
-        'default' => '0'),
+        'default' => 0),
     ),
     'primary key' => array('cid'),
     'unique keys' => array(
@@ -131,3 +131,19 @@
 
   return $ret;
 }
+
+/**
+ * Implementation of hook_update().
+ *
+ * Update the defaults for weight/selected to integers instead of strings.
+ */
+function mass_contact_update_6002() {
+  $ret = array();
+
+  // Can't use db_field_set_default() due to Drupal bug http://drupal.org/node/517642
+  $ret[] = update_sql('ALTER TABLE {mass_contact} ALTER COLUMN weight SET DEFAULT 0');
+  $ret[] = update_sql('ALTER TABLE {mass_contact} ALTER COLUMN selected SET DEFAULT 0');
+
+  return $ret;
+}
+
