From 16ae65464cb33b16d77cb214bebb699158d548a7 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 7 Aug 2010 10:57:18 -0700 Subject: Oops. Fix the upgrader path to add the weight column to the modules table. --- modules/gallery/helpers/gallery_installer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules') 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); } -- cgit v1.2.3