diff options
author | jhilden <jakobhilden@gmail.com> | 2009-06-29 16:03:45 -0400 |
---|---|---|
committer | jhilden <jakobhilden@gmail.com> | 2009-06-29 16:03:45 -0400 |
commit | b31b3bd5bff4f8d5b5721e0fdd86579028a5b03a (patch) | |
tree | 9baa2a301c1e26dcf872e0bbfbb09be34cb020d5 /modules/notification/helpers | |
parent | eb82f6a64a6b4e0b4e18ca92689bd467cba6e1bd (diff) | |
parent | 5de6de6a133c6c906ee63b5a2ab1b08bc14ca17e (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/notification/helpers')
-rw-r--r-- | modules/notification/helpers/notification_installer.php | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/modules/notification/helpers/notification_installer.php b/modules/notification/helpers/notification_installer.php index ad10184b..3d450258 100644 --- a/modules/notification/helpers/notification_installer.php +++ b/modules/notification/helpers/notification_installer.php @@ -20,27 +20,23 @@ class notification_installer { static function install() { $db = Database::instance(); - $version = module::get_version("notification"); + $db->query("CREATE TABLE IF NOT EXISTS {subscriptions} ( + `id` int(9) NOT NULL auto_increment, + `item_id` int(9) NOT NULL, + `user_id` int(9) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY (`item_id`, `user_id`), + UNIQUE KEY (`user_id`, `item_id`)) + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + $db->query("CREATE TABLE IF NOT EXISTS {pending_notifications} ( + `id` int(9) NOT NULL auto_increment, + `email` varchar(128) NOT NULL, + `subject` varchar(255) NOT NULL, + `text` text, + PRIMARY KEY (`id`)) + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - if ($version == 0) { - $db->query("CREATE TABLE IF NOT EXISTS {subscriptions} ( - `id` int(9) NOT NULL auto_increment, - `item_id` int(9) NOT NULL, - `user_id` int(9) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY (`item_id`, `user_id`), - UNIQUE KEY (`user_id`, `item_id`)) - ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - $db->query("CREATE TABLE IF NOT EXISTS {pending_notifications} ( - `id` int(9) NOT NULL auto_increment, - `email` varchar(128) NOT NULL, - `subject` varchar(255) NOT NULL, - `text` text, - PRIMARY KEY (`id`)) - ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - - module::set_version("notification", 1); - } + module::set_version("notification", 1); } static function uninstall() { |