From b1d8b53a1b6e6fc5b34324a89910d9c70a350b52 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 12 Nov 2009 06:46:44 +0000 Subject: - Patch #292984 by sun: add cid to node_comment_statistics() for Views support and simplification of the code. --- modules/comment/comment.install | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'modules/comment/comment.install') diff --git a/modules/comment/comment.install b/modules/comment/comment.install index 640b54f7f..f6db6408e 100644 --- a/modules/comment/comment.install +++ b/modules/comment/comment.install @@ -194,6 +194,19 @@ function comment_update_7009() { return array(); } +/** + * Add {node_comment_statistics}.cid column. + */ +function comment_update_7010() { + db_add_field('node_comment_statistics', 'cid', array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => 'The {comment}.cid of the last comment.', + )); + db_add_index('node_comment_statistics', 'cid', array('cid')); +} + /** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. @@ -331,6 +344,12 @@ function comment_schema() { 'default' => 0, 'description' => 'The {node}.nid for which the statistics are compiled.', ), + 'cid' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => 'The {comment}.cid of the last comment.', + ), 'last_comment_timestamp' => array( 'type' => 'int', 'not null' => TRUE, -- cgit v1.2.3