summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-08-07 10:57:18 -0700
committerBharat Mediratta <bharat@menalto.com>2010-08-07 10:57:18 -0700
commit16ae65464cb33b16d77cb214bebb699158d548a7 (patch)
tree5bd5d7df2c0c5dd82915c2bc38966ee755b18276
parent1b2da1ff70acba4177a7ebea825f802f24801a0c (diff)
Oops. Fix the upgrader path to add the weight column to the modules table.
-rw-r--r--modules/gallery/helpers/gallery_installer.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 8fc0cf96..7896a7a7 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -565,8 +565,10 @@ class gallery_installer {
}
if ($version == 31) {
+ $db->query("ALTER TABLE {modules} ADD COLUMN `weight` int(9) DEFAULT NULL");
+ $db->query("ALTER TABLE {modules} ADD KEY (`weight`)");
db::update("modules")
- ->set("weight", "=", "id")
+ ->set("weight", new Database_Expression("`id`"))
->execute();
module::set_version("gallery", $version = 32);
}