function comment_update_7004
Upgrade the {node_comment_statistics} table.
Related topics
File
-
modules/
comment/ comment.install, line 217
Code
function comment_update_7004() {
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',
));
// The comment_count index may have been added in Drupal 6.
if (!db_index_exists('node_comment_statistics', 'comment_count')) {
// Add an index on the comment_count.
db_add_index('node_comment_statistics', 'comment_count', array(
'comment_count',
));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.