? privatemsg.sv_.zip
Index: privatemsg.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/privatemsg/privatemsg.install,v
retrieving revision 1.20
diff -u -p -r1.20 privatemsg.install
--- privatemsg.install	20 Oct 2010 12:52:58 -0000	1.20
+++ privatemsg.install	12 Jan 2011 10:40:18 -0000
@@ -54,10 +54,9 @@ function privatemsg_schema() {
     ),
     'primary key'     => array('mid', 'recipient', 'type'),
     'indexes'         => array(
-      'mid'               => array('mid'),
-      'thread_id'         => array('thread_id'),
-      'recipient'         => array('recipient', 'type'),
-      'is_new'            => array('mid', 'recipient', 'type', 'is_new'),
+      'list'          => array('recipient', 'type', 'deleted', 'is_new'),
+      'messages'      => array('mid', 'recipient', 'type'),
+      'participants'  => array('thread_id', 'recipient', 'type', 'deleted'),
     ),
   );
 
@@ -103,11 +102,6 @@ function privatemsg_schema() {
       ),
     ),
     'primary key'     => array('mid'),
-    'indexes'         => array(
-      'author'            => array('author'),
-      'subject'           => array(array('subject', 20)),
-      'timestamp'         => array('timestamp'),
-    ),
   );
 
   $schema['pm_disable'] = array(
@@ -517,11 +511,6 @@ function privatemsg_update_6006() {
 function privatemsg_update_6200() {
   $ret = array();
 
-  // Make sure to not run this update twice.
-  if (db_table_exists('pm_disable')) {
-    return $ret;
-  }
-
   $schema['pm_disable'] = array(
     'description'       => '{pm_disable} holds the list of users that have disabled private messaging',
     'fields' => array(
@@ -552,8 +541,9 @@ function privatemsg_update_6201() {
   if (db_column_exists('pm_index', 'recipient')) {
     return $ret;
   }
-  db_drop_index($ret, 'pm_index', 'uid');
-  db_drop_index($ret, 'pm_index', 'is_new');
+  db_drop_index($ret, 'pm_index', 'list');
+  db_drop_index($ret, 'pm_index', 'messages');
+  db_drop_index($ret, 'pm_index', 'participants');
   db_change_field($ret, 'pm_index', 'uid', 'recipient', array(
     'description'   => 'ID of the recipient object, typically user',
     'type'          => 'int',
@@ -561,15 +551,18 @@ function privatemsg_update_6201() {
     'unsigned'      => TRUE,
   ));
   db_add_field($ret, 'pm_index', 'type', array(
-        'description'   => 'Type of recipient object',
-        'type' => 'varchar',
-        'not null' => TRUE,
-        'length'  => '255',
-        'default' => 'user'
-      ), array('indexes' => array(
-      'recipient'         => array('recipient', 'type'),
-      'is_new'            => array('mid', 'recipient', 'type', 'is_new')
-  )));
+      'description'   => 'Type of recipient object',
+      'type' => 'varchar',
+      'not null' => TRUE,
+      'length'  => '255',
+      'default' => 'user'
+    ), array(
+    'indexes' => array(
+      'list'         => array('recipient', 'type', 'deleted', 'is_new'),
+      'messages'     => array('mid', 'recipient', 'type'),
+      'participants' => array('thread_id', 'recipient', 'type', 'deleted'),
+    ),
+  ));
   return $ret;
 }
 
@@ -631,9 +624,7 @@ function privatemsg_update_6202(&$sandbo
 function privatemsg_update_6203() {
   $ret = array();
   db_add_primary_key($ret, 'pm_index', array('mid', 'recipient', 'type'));
-  // Ignore error that happens when this update runs twice.
-  if (!$ret[0]['success']) {
-    unset($ret[0]);
-  }
-  return $ret;
+  // Ignore error that happens when this update runs twice, don't return
+  // anything.
+  return array();
 }
Index: privatemsg_filter/privatemsg_filter.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/privatemsg/privatemsg_filter/privatemsg_filter.install,v
retrieving revision 1.7
diff -u -p -r1.7 privatemsg_filter.install
--- privatemsg_filter/privatemsg_filter.install	20 Oct 2010 12:52:58 -0000	1.7
+++ privatemsg_filter/privatemsg_filter.install	12 Jan 2011 10:40:18 -0000
@@ -42,7 +42,10 @@ function privatemsg_filter_schema() {
         'default'       => 0,
       )
     ),
-    'primary key'     => array('tag_id')
+    'primary key'     => array('tag_id'),
+    'indexes'     => array(
+      'tag_list'    => array('tag_id', 'tag', 'public'),
+    ),
   );
 
   $schema['pm_tags_index'] = array(
@@ -69,7 +72,7 @@ function privatemsg_filter_schema() {
     ),
     'primary key'     => array('tag_id', 'uid', 'thread_id'),
     'indexes'         => array(
-     'uid'            => array('uid'),
+     'thread_tags'      => array('uid', 'thread_id'),
     ),
   );
 
