diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2011-05-23 16:42:32 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2011-05-23 16:42:32 -0700 |
commit | 3fce53d61703552c4c5a2c671b8adfee8e0ef966 (patch) | |
tree | 7269bf82a843f69aacdb72fb687227966bde8be7 /modules/comment | |
parent | de8325a3efd814614174917ab57be2d634f41b07 (diff) | |
download | brdo-3fce53d61703552c4c5a2c671b8adfee8e0ef966.tar.gz brdo-3fce53d61703552c4c5a2c671b8adfee8e0ef966.tar.bz2 |
Issue #1154806 by lyricnz, marcingy, Starminder: Fixed Comment Schema mismatch after upgrade D6 to D7.
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.install | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/comment/comment.install b/modules/comment/comment.install index 51bfa7453..d64b3acde 100644 --- a/modules/comment/comment.install +++ b/modules/comment/comment.install @@ -344,6 +344,26 @@ function comment_update_7007() { } /** + * Update database to match Drupal 7 schema. + */ +function comment_update_7008() { + // Update default status to 1. + db_change_field('comment', 'status', 'status', array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 1, + 'size' => 'tiny', + )); + + // Realign indexes. + db_drop_index('comment', 'comment_status_pid'); + db_add_index('comment', 'comment_status_pid', array('pid', 'status')); + db_drop_index('comment', 'comment_pid_status'); + db_drop_index('comment', 'nid'); +} + +/** * @} End of "addtogroup updates-6.x-to-7.x" */ |