Skip to content

Commit

Permalink
Don't use "else" clauses in upgrade() -- it prevents multiple version…
Browse files Browse the repository at this point in the history
… bumps at once.
  • Loading branch information
bharat committed Jul 14, 2009
1 parent c4a3093 commit 4720e45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/server_add/helpers/server_add_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ static function upgrade($version) {
PRIMARY KEY (`id`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;");
module::set_version("server_add", $version = 2);
} else if ($version == 2) {
}

if ($version == 2) {
$db->query("ALTER TABLE {server_add_files} ADD COLUMN `item_id` int(9)");
$db->query("ALTER TABLE {server_add_files} ADD COLUMN `parent_id` int(9)");
module::set_version("server_add", $version = 3);
Expand Down

0 comments on commit 4720e45

Please sign in to comment.