--- comment.install.orig	2009-06-17 10:23:56.000000000 +0800
+++ comment.install	2009-06-17 10:33:24.000000000 +0800
@@ -67,6 +67,17 @@
   return $ret;
 }
 
+/**
+ * Make nid column the same type as {node}.nid column
+ */
+function comment_update_6003() {
+  $ret = array();
+  db_drop_index($ret, 'comments', 'nid');
+  db_change_field($ret, 'comments', 'nid', 'nid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
+  db_add_index($ret, 'comments', 'nid', array('nid'));
+  return $ret;
+}
+
 
 /**
  * Implementation of hook_schema().
@@ -88,6 +99,7 @@
       ),
       'nid' => array(
         'type' => 'int',
+        'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
         'description' => 'The {node}.nid to which this comment is a reply.',
