summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_installer.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2013-01-27 15:35:42 -0500
committerBharat Mediratta <bharat@menalto.com>2013-01-27 15:35:42 -0500
commite957c97c947427093d03de3302f4d98909d1ab1a (patch)
treefa2f343219e42691d568088832bfaedbd147b3f5 /modules/gallery/helpers/gallery_installer.php
parent0c214d85e63fc74fb315ca1b542251d5c6112201 (diff)
Add a key on relative_path_cache in the items table to improve performance on installs
that use File_Proxy heavily. Fixes #1920.
Diffstat (limited to 'modules/gallery/helpers/gallery_installer.php')
-rw-r--r--modules/gallery/helpers/gallery_installer.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 86ff7ce5..d4c4de14 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -116,7 +116,8 @@ class gallery_installer {
KEY `type` (`type`),
KEY `random` (`rand_key`),
KEY `weight` (`weight` DESC),
- KEY `left_ptr` (`left_ptr`))
+ KEY `left_ptr` (`left_ptr`),
+ KEY `relative_path_cache` (`relative_path_cache`))
DEFAULT CHARSET=utf8;");
$db->query("CREATE TABLE {logs} (
@@ -315,7 +316,7 @@ class gallery_installer {
module::set_var("gallery", "lock_timeout", 1);
module::set_var("gallery", "movie_extract_frame_time", 3);
- module::set_version("gallery", 54);
+ module::set_version("gallery", 55);
}
static function upgrade($version) {
@@ -784,6 +785,12 @@ class gallery_installer {
}
module::set_version("gallery", $version = 54);
}
+
+ if ($version == 54) {
+ $db->query("ALTER TABLE {items} ADD KEY `relative_path_cache` (`relative_path_cache`)");
+ module::set_version("gallery", $version = 55);
+ }
+
}
static function uninstall() {