diff options
-rw-r--r-- | modules/comment/helpers/comment_installer.php | 8 | ||||
-rw-r--r-- | modules/comment/module.info | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php index 2bfb7330..f5a7542b 100644 --- a/modules/comment/helpers/comment_installer.php +++ b/modules/comment/helpers/comment_installer.php @@ -51,6 +51,14 @@ class comment_installer { module::set_version("comment", 1); } + static function upgrade($version) { + if ($version == 1) { + $db = Database::instance(); + $db->query("ALTER TABLE {comments} CHANGE `state` `state` varchar(15) default 'unpublished'"); + module::set_version("comment", 2); + } + } + static function uninstall() { $db = Database::instance(); $sql = "SELECT `item_id` FROM {comments}"; diff --git a/modules/comment/module.info b/modules/comment/module.info index 08a800a6..946f1d39 100644 --- a/modules/comment/module.info +++ b/modules/comment/module.info @@ -1,3 +1,3 @@ name = Comments description = Allows users and guests to leave comments on photos and albums. -version = 1 +version = 2 |