Index: modules/search/search.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.install,v
retrieving revision 1.27
diff -u -p -r1.27 search.install
--- modules/search/search.install	4 Dec 2009 16:49:47 -0000	1.27
+++ modules/search/search.install	14 Jul 2010 15:01:38 -0000
@@ -32,7 +32,7 @@ function search_schema() {
       'type' => array(
         'type' => 'varchar',
         'length' => 16,
-        'not null' => FALSE,
+        'not null' => TRUE,
         'description' => 'Type of item, e.g. node.',
       ),
       'data' => array(
@@ -72,7 +72,7 @@ function search_schema() {
       'type' => array(
         'type' => 'varchar',
         'length' => 16,
-        'not null' => FALSE,
+        'not null' => TRUE,
         'description' => 'The {search_dataset}.type of the searchable item to which the word belongs.',
       ),
       'score' => array(
@@ -155,9 +155,24 @@ function search_schema() {
  */
 function search_update_7000() {
   db_drop_unique_key('search_dataset', 'sid_type');
+  $dataset_type_spec = array(
+    'type' => 'varchar',
+    'length' => 16,
+    'not null' => TRUE,
+    'description' => 'Type of item, e.g. node.',
+  );
+  db_change_field('search_dataset', 'type', 'type', $dataset_type_spec);
   db_add_primary_key('search_dataset', array('sid', 'type'));
 
   db_drop_index('search_index', 'word');
   db_drop_unique_key('search_index', 'word_sid_type');
+  $index_type_spec = array(
+    'type' => 'varchar',
+    'length' => 16,
+    'not null' => TRUE,
+    'description' => 'The {search_dataset}.type of the searchable item to which the word belongs.',
+  );
+  db_change_field('search_index', 'type', 'type', $index_type_spec);
   db_add_primary_key('search_index', array('word', 'sid', 'type'));
 }
+
