summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-29 04:14:47 +0800
committerTim Almdal <tnalmdal@shaw.ca>2009-06-29 04:17:32 +0800
commit3d7daf58ed62d0a350ded25ab9bd30c63571807e (patch)
tree6ad823757326394651cc95e0add85dac9b41ef1f /modules/gallery/helpers
parent1c44537097e01f50c6c2840d0020d6a2406e2878 (diff)
Change the cache column of the caches table to a large blob. This fixes ticket #485 and gives us the extra adavantage of not having to serialize the data (as the database driver handles that for us)
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/gallery_installer.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 92fc662d..8ccbd51b 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -185,7 +185,7 @@ class gallery_installer {
`id` varchar(255) NOT NULL,
`tags` varchar(255),
`expiration` int(9) NOT NULL,
- `cache` text,
+ `cache` longblob,
PRIMARY KEY (`id`),
KEY (`tags`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;");
@@ -258,7 +258,7 @@ class gallery_installer {
module::set_var("gallery", "show_credits", 1);
// @todo this string needs to be picked up by l10n_scanner
module::set_var("gallery", "credits", "Powered by <a href=\"%url\">Gallery %version</a>");
- module::set_version("gallery", 4);
+ module::set_version("gallery", 5);
}
static function upgrade($version) {
@@ -287,6 +287,11 @@ class gallery_installer {
ENGINE=InnoDB DEFAULT CHARSET=utf8;");
module::set_version("gallery", $version = 4);
}
+ if ($version == 4) {
+ Cache::instance()->delete_all();
+ $db->query("ALTER TABLE {caches} modify column cache LONGBLOB");
+ module::set_version("gallery", $version = 5);
+ }
}
static function uninstall() {