summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_installer.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-08-07 12:18:43 -0700
committerBharat Mediratta <bharat@menalto.com>2010-08-07 12:18:43 -0700
commit779d91cca01567a09b894e9fff4dfa32cb82d3d9 (patch)
tree3b2eccb1f86100b35b3f13b514c0fb10e017432f /modules/gallery/helpers/gallery_installer.php
parent67636ade24ca5fca394cc4f75227294f6927be29 (diff)
Add an index for left_ptr, since we use that in ORM_MPTT::parents()
which is on every album page. Bump Gallery module version to 33.
Diffstat (limited to 'modules/gallery/helpers/gallery_installer.php')
-rw-r--r--modules/gallery/helpers/gallery_installer.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 7896a7a7..21c47ad5 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -114,7 +114,8 @@ class gallery_installer {
KEY `parent_id` (`parent_id`),
KEY `type` (`type`),
KEY `random` (`rand_key`),
- KEY `weight` (`weight` DESC))
+ KEY `weight` (`weight` DESC),
+ KEY `left_ptr` (`left_ptr`))
DEFAULT CHARSET=utf8;");
$db->query("CREATE TABLE {logs} (
@@ -298,7 +299,7 @@ class gallery_installer {
module::set_var("gallery", "simultaneous_upload_limit", 5);
module::set_var("gallery", "admin_area_timeout", 90 * 60);
module::set_var("gallery", "maintenance_mode", 0);
- module::set_version("gallery", 32);
+ module::set_version("gallery", 33);
}
static function upgrade($version) {
@@ -572,6 +573,11 @@ class gallery_installer {
->execute();
module::set_version("gallery", $version = 32);
}
+
+ if ($version == 32) {
+ $db->query("ALTER TABLE {items} ADD KEY (`left_ptr`)");
+ module::set_version("gallery", $version = 33);
+ }
}
static function uninstall() {