diff options
Diffstat (limited to 'modules/comment/comment.install')
-rw-r--r-- | modules/comment/comment.install | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/modules/comment/comment.install b/modules/comment/comment.install index cc1ea7353..96f0e3dca 100644 --- a/modules/comment/comment.install +++ b/modules/comment/comment.install @@ -97,6 +97,18 @@ function comment_update_7000() { } /** + * Change comment status from published being 0 to being 1 + */ +function comment_update_7001() { + $ret = array(); + $ret[] = update_sql("UPDATE {comments} SET status = 3 WHERE status = 0"); + $ret[] = update_sql("UPDATE {comments} SET status = 0 WHERE status = 1"); + $ret[] = update_sql("UPDATE {comments} SET status = 1 WHERE status = 3"); + + return $ret; +} + +/** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. */ @@ -161,9 +173,9 @@ function comment_schema() { 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, - 'default' => 0, + 'default' => 1, 'size' => 'tiny', - 'description' => t('The published status of a comment. (0 = Published, 1 = Not Published)'), + 'description' => t('The published status of a comment. (0 = Not Published, 1 = Published)'), ), 'format' => array( 'type' => 'int', |