BUG 6962 Fix database-upgrade command when errors occur
This commit is contained in:
@@ -244,9 +244,9 @@ function database_upgrade($command, $args) {
|
|||||||
$checkOnly = (strcmp($command, "check") == 0);
|
$checkOnly = (strcmp($command, "check") == 0);
|
||||||
foreach ($workspaces as $workspace) {
|
foreach ($workspaces as $workspace) {
|
||||||
if ($checkOnly)
|
if ($checkOnly)
|
||||||
print_r("Checking database in ".pakeColor::colorize($workspace->name, "INFO")." ");
|
print_r("Checking database in ".pakeColor::colorize($workspace->name, "INFO")."\n");
|
||||||
else
|
else
|
||||||
print_r("Upgrading database in ".pakeColor::colorize($workspace->name, "INFO")." ");
|
print_r("Upgrading database in ".pakeColor::colorize($workspace->name, "INFO")."\n");
|
||||||
try {
|
try {
|
||||||
$changes = $workspace->upgradeDatabase($checkOnly);
|
$changes = $workspace->upgradeDatabase($checkOnly);
|
||||||
if ($changes != false) {
|
if ($changes != false) {
|
||||||
@@ -263,7 +263,7 @@ function database_upgrade($command, $args) {
|
|||||||
echo "> OK\n";
|
echo "> OK\n";
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
echo "> Error: ".error($e->getMessage()) . "\n";
|
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user