summaryrefslogtreecommitdiff
path: root/modules/tag
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-23 15:17:03 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-06-23 15:17:03 -0700
commit79522bd4f31f8e4d70e754e42d5d33c4031519c9 (patch)
tree12819f685a9983fb783af457ebd9aa5cded09c62 /modules/tag
parent8f443cef3e304c12f9e3555332880395051e7e3d (diff)
parentda09185a4baa739dd011804eb1301cdf2d126c11 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/tag')
-rw-r--r--modules/tag/helpers/tag_installer.php35
1 files changed, 16 insertions, 19 deletions
diff --git a/modules/tag/helpers/tag_installer.php b/modules/tag/helpers/tag_installer.php
index 07544c54..3c16e3f3 100644
--- a/modules/tag/helpers/tag_installer.php
+++ b/modules/tag/helpers/tag_installer.php
@@ -20,26 +20,23 @@
class tag_installer {
static function install() {
$db = Database::instance();
- $version = module::get_version("tag");
- if ($version == 0) {
- $db->query("CREATE TABLE IF NOT EXISTS {tags} (
- `id` int(9) NOT NULL auto_increment,
- `name` varchar(64) NOT NULL,
- `count` int(10) unsigned NOT NULL DEFAULT 0,
- PRIMARY KEY (`id`),
- UNIQUE KEY(`name`))
- ENGINE=InnoDB DEFAULT CHARSET=utf8;");
+ $db->query("CREATE TABLE IF NOT EXISTS {tags} (
+ `id` int(9) NOT NULL auto_increment,
+ `name` varchar(64) NOT NULL,
+ `count` int(10) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY(`name`))
+ ENGINE=InnoDB DEFAULT CHARSET=utf8;");
- $db->query("CREATE TABLE IF NOT EXISTS {items_tags} (
- `id` int(9) NOT NULL auto_increment,
- `item_id` int(9) NOT NULL,
- `tag_id` int(9) NOT NULL,
- PRIMARY KEY (`id`),
- KEY(`tag_id`, `id`),
- KEY(`item_id`, `id`))
- ENGINE=InnoDB DEFAULT CHARSET=utf8;");
- module::set_version("tag", 1);
- }
+ $db->query("CREATE TABLE IF NOT EXISTS {items_tags} (
+ `id` int(9) NOT NULL auto_increment,
+ `item_id` int(9) NOT NULL,
+ `tag_id` int(9) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY(`tag_id`, `id`),
+ KEY(`item_id`, `id`))
+ ENGINE=InnoDB DEFAULT CHARSET=utf8;");
+ module::set_version("tag", 1);
}
static function uninstall() {