Skip to content

Commit

Permalink
Allow to force a version number through a comman line client
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Chernyshev committed Apr 2, 2012
1 parent f775df2 commit a03ae3b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client.php
Expand Up @@ -7,6 +7,12 @@
header('Content-type: text/plain');

try {
if (!empty($argc) && count($argv) == 3 && $argv[1] == 'set' && is_numeric($argv[2])) {
echo 'Forcing DB version to v.'.intval($argv[2])."\n";
$dbupgrade->set_db_version(intval($argv[2]));
exit;
}

if (!empty($argc) && count($argv) == 2 && $argv[1] == 'down') {
$dbupgrade->dbdown();
} else {
Expand Down

0 comments on commit a03ae3b

Please sign in to comment.