Skip to content

Commit

Permalink
Oops. Fix the upgrader path to add the weight column to the modules t…
Browse files Browse the repository at this point in the history
…able.
  • Loading branch information
bharat committed Aug 7, 2010
1 parent 1b2da1f commit 16ae654
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/gallery/helpers/gallery_installer.php
Expand Up @@ -565,8 +565,10 @@ static function upgrade($version) {
}

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);
}
Expand Down

0 comments on commit 16ae654

Please sign in to comment.