diff options
Diffstat (limited to 'modules/forum/forum.install')
-rw-r--r-- | modules/forum/forum.install | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/forum/forum.install b/modules/forum/forum.install index fe3099557..1813567ae 100644 --- a/modules/forum/forum.install +++ b/modules/forum/forum.install @@ -215,7 +215,7 @@ function forum_schema() { ), ), 'indexes' => array( - 'forum_topics' => array('tid', 'sticky', 'last_comment_timestamp'), + 'forum_topics' => array('nid', 'tid', 'sticky', 'last_comment_timestamp'), ), 'foreign keys' => array( 'tracked_node' => array( @@ -330,3 +330,11 @@ function forum_update_7001() { ->from($select) ->execute(); } + +/** + * Add new index to forum_index table. + */ +function forum_update_7002() { + db_drop_index('forum_index', 'forum_topics'); + db_add_index('forum_index', 'forum_topics', array('nid', 'tid', 'sticky', 'last_comment_timestamp')); +} |