Index: modules/comment/comment.install =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.install,v retrieving revision 1.19.2.1 diff -u -p -r1.19.2.1 comment.install --- modules/comment/comment.install 6 Jan 2009 15:46:36 -0000 1.19.2.1 +++ modules/comment/comment.install 15 Dec 2009 19:45:46 -0000 @@ -67,6 +67,25 @@ function comment_update_6003() { return $ret; } +/** + * @defgroup updates-6.x-extra Extra system updates for 6.x + * @{ + */ + +/** + * Add indices to uid fields. + */ +function comment_update_6004() { + $ret = array(); + db_add_index($ret, 'comments', 'uid', array('uid')); + db_add_index($ret, 'node_comment_statistics', 'last_comment_uid', array('last_comment_uid')); + return $ret; +} + +/** + * @} End of "defgroup updates-6.x-extra" + * The next series of updates should start at 7000. + */ /** * Implementation of hook_schema(). @@ -167,6 +186,7 @@ function comment_schema() { 'indexes' => array( 'pid' => array('pid'), 'nid' => array('nid'), + 'uid' => array('uid'), 'status' => array('status'), // This index is probably unused ), 'primary key' => array('cid'), @@ -210,10 +230,10 @@ function comment_schema() { ), 'primary key' => array('nid'), 'indexes' => array( - 'node_comment_timestamp' => array('last_comment_timestamp') + 'node_comment_timestamp' => array('last_comment_timestamp'), + 'last_comment_uid' => array('last_comment_uid'), ), ); return $schema; } -