diff --git a/installer/install.sql b/installer/install.sql index 0ed7f2f31f..07aae36d22 100644 --- a/installer/install.sql +++ b/installer/install.sql @@ -160,7 +160,7 @@ CREATE TABLE {items} ( `name` varchar(255) DEFAULT NULL, `owner_id` int(9) DEFAULT NULL, `parent_id` int(9) NOT NULL, - `rand_key` float DEFAULT NULL, + `rand_key` decimal(11,10) DEFAULT NULL, `relative_path_cache` varchar(255) DEFAULT NULL, `relative_url_cache` varchar(255) DEFAULT NULL, `resize_dirty` tinyint(1) DEFAULT '1', @@ -244,7 +244,7 @@ CREATE TABLE {modules} ( KEY `weight` (`weight`) ) AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -INSERT INTO {modules} VALUES (1,1,'gallery',43,1); +INSERT INTO {modules} VALUES (1,1,'gallery',44,1); INSERT INTO {modules} VALUES (2,1,'user',3,2); INSERT INTO {modules} VALUES (3,1,'comment',3,3); INSERT INTO {modules} VALUES (4,1,'organize',3,4); diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index f7b8da5f5c..3c7b1c845c 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -92,7 +92,7 @@ static function install() { `name` varchar(255) default NULL, `owner_id` int(9) default NULL, `parent_id` int(9) NOT NULL, - `rand_key` float default NULL, + `rand_key` decimal(11,10) default NULL, `relative_path_cache` varchar(255) default NULL, `relative_url_cache` varchar(255) default NULL, `resize_dirty` boolean default 1, @@ -309,7 +309,7 @@ static function install() { module::set_var("gallery", "show_user_profiles_to", "registered_users"); module::set_var("gallery", "extra_binary_paths", "/usr/local/bin:/opt/local/bin:/opt/bin"); - module::set_version("gallery", 43); + module::set_version("gallery", 44); } static function upgrade($version) { @@ -653,6 +653,11 @@ static function upgrade($version) { $db->query("ALTER TABLE {items} CHANGE `description` `description` text DEFAULT NULL"); module::set_version("gallery", $version = 43); } + + if ($version == 43) { + $db->query("ALTER TABLE {items} CHANGE `rand_key` `rand_key` DECIMAL(11, 10)"); + module::set_version("gallery", $version = 44); + } } static function uninstall() { diff --git a/modules/gallery/module.info b/modules/gallery/module.info index eb579ab655..4c4e63a15d 100644 --- a/modules/gallery/module.info +++ b/modules/gallery/module.info @@ -1,3 +1,3 @@ name = "Gallery 3" description = "Gallery core application" -version = 43 +version = 44