diff options
author | mamouneyya <mamoun.diraneyya@gmail.com> | 2010-06-18 23:30:49 +0300 |
---|---|---|
committer | mamouneyya <mamoun.diraneyya@gmail.com> | 2010-06-18 23:30:49 +0300 |
commit | 2cd784e612d0376e8eafcf5085507c678f36e6f4 (patch) | |
tree | 2e07b3c058a9a0da78befbcea63d795fce05a2c5 /modules/tag/helpers | |
parent | 6078eb6264346eba221897f3ddefea1d9ec73821 (diff) | |
parent | 84c8d1c79a07aa72bb0a22cd3c0673df6f5886f2 (diff) |
Merge remote branch 'gallery3/master'
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r-- | modules/tag/helpers/tag_installer.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/tag/helpers/tag_installer.php b/modules/tag/helpers/tag_installer.php index 6ccaf835..df6f0c65 100644 --- a/modules/tag/helpers/tag_installer.php +++ b/modules/tag/helpers/tag_installer.php @@ -22,7 +22,7 @@ class tag_installer { $db = Database::instance(); $db->query("CREATE TABLE IF NOT EXISTS {tags} ( `id` int(9) NOT NULL auto_increment, - `name` varchar(64) NOT NULL, + `name` varchar(128) NOT NULL, `count` int(10) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY(`name`)) @@ -36,7 +36,15 @@ class tag_installer { KEY(`tag_id`, `id`), KEY(`item_id`, `id`)) DEFAULT CHARSET=utf8;"); - module::set_version("tag", 1); + module::set_version("tag", 2); + } + + static function upgrade($version) { + $db = Database::instance(); + if ($version == 1) { + $db->query("ALTER TABLE {tags} MODIFY COLUMN `name` VARCHAR(128)"); + module::set_version("tag", $version = 2); + } } static function uninstall() { |