Skip to content

Commit

Permalink
Merge remote branch 'gallery3/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mamouneyya committed Jun 18, 2010
2 parents 6078eb6 + 84c8d1c commit 2cd784e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion installer/install.sql
Expand Up @@ -309,7 +309,7 @@ DROP TABLE IF EXISTS {tags};
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE {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` (`name`)
Expand Down
12 changes: 10 additions & 2 deletions modules/tag/helpers/tag_installer.php
Expand Up @@ -22,7 +22,7 @@ static function install() {
$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`))
Expand All @@ -36,7 +36,15 @@ static function install() {
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() {
Expand Down
2 changes: 1 addition & 1 deletion modules/tag/module.info
@@ -1,3 +1,3 @@
name = "Tags"
description = "Allows users to tag photos and albums"
version = 1
version = 2

0 comments on commit 2cd784e

Please sign in to comment.