BUG-11707 Al realizar workspace-restore de un backup creado... SOLVED
- Not update the schema. - add validation to restore.
This commit is contained in:
@@ -74,6 +74,7 @@ CLI::taskOpt("info", "Only shows information about a backup archive.", "i");
|
||||
CLI::taskOpt("multiple", "Restore from multiple compresed enumerated files.", "m");
|
||||
CLI::taskOpt("workspace", "Select which workspace to restore if multiple workspaces are present in the archive.",
|
||||
"w:", "workspace=");
|
||||
CLI::taskOpt("lang", "Set the language for upgrade cacheView, by default en.", "l:","lang=");
|
||||
CLI::taskRun(run_workspace_restore);
|
||||
|
||||
CLI::taskName('cacheview-repair');
|
||||
@@ -91,6 +92,7 @@ CLI::taskDescription(<<<EOT
|
||||
EOT
|
||||
);
|
||||
CLI::taskArg('workspace', true, true);
|
||||
CLI::taskOpt("lang", "Set the language for upgrade cacheView, by default en.", "l:","lang=");
|
||||
CLI::taskRun(run_cacheview_upgrade);
|
||||
|
||||
CLI::taskName('database-upgrade');
|
||||
@@ -174,9 +176,10 @@ function run_info($args, $opts) {
|
||||
function run_workspace_upgrade($args, $opts) {
|
||||
$workspaces = get_workspaces_from_args($args);
|
||||
$first = true;
|
||||
$lang = array_key_exists("lang", $opts) ? $opts['lang'] : 'en';
|
||||
foreach ($workspaces as $workspace) {
|
||||
try {
|
||||
$workspace->upgrade($first, false, $workspace->name);
|
||||
$workspace->upgrade($first, false, $workspace->name, $lang);
|
||||
$first = false;
|
||||
} catch (Exception $e) {
|
||||
echo "Errors upgrading workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n";
|
||||
@@ -200,10 +203,11 @@ function run_translation_upgrade($args, $opts) {
|
||||
|
||||
function run_cacheview_upgrade($args, $opts) {
|
||||
$workspaces = get_workspaces_from_args($args);
|
||||
$lang = array_key_exists("lang", $opts) ? $opts['lang'] : 'en';
|
||||
foreach ($workspaces as $workspace) {
|
||||
try {
|
||||
echo "Upgrading cache view for " . pakeColor::colorize($workspace->name, "INFO") . "\n";
|
||||
$workspace->upgradeCacheView();
|
||||
$workspace->upgradeCacheView(true, false, $lang);
|
||||
} catch (Exception $e) {
|
||||
echo "Errors upgrading translation of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n";
|
||||
}
|
||||
@@ -423,6 +427,7 @@ function run_workspace_restore($args, $opts) {
|
||||
$filename .= ".tar";
|
||||
}
|
||||
$info = array_key_exists("info", $opts);
|
||||
$lang = array_key_exists("lang", $opts) ? $opts['lang'] : 'en';
|
||||
if ($info) {
|
||||
workspaceTools::getBackupInfo($filename);
|
||||
} else {
|
||||
@@ -450,7 +455,7 @@ function run_workspace_restore($args, $opts) {
|
||||
CLI::error("Please, you should use -m parameter to restore them.\n");
|
||||
return;
|
||||
}
|
||||
workspaceTools::restore($filename, $workspace, $dstWorkspace, $overwrite);
|
||||
workspaceTools::restore($filename, $workspace, $dstWorkspace, $overwrite, $lang);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user