PM-3037 "0017677: The 'processmaker workspace-restore' command..." SOLVED
Issue:
0017677: The "processmaker workspace-restore" command should automatically
execute "cacheview-repair" and "migrate-new-cases-lists"
Cause:
El comando "workspace-restore" no verifica de manera correcta si debe o no
ejecutar los modulos "cacheview-repair" y "migrate-new-cases-lists"
Solution:
- El comando "workspace-restore" ejecutara los modulos "cacheview-repair" y
"migrate-new-cases-lists" en los siguientes casos:
> "cacheview-repair" sera ejecutado si la version de ProcessMaker del backup
es menor a la version de ProcessMaker del sistema
> "migrate-new-cases-lists" sera ejecutado si la version de ProcessMaker del backup
es menor a la version ProcessMaker-2.9
- Se hizo correcciones para servidores Windows
- Al ejecutar el comando "migrate-new-cases-lists" iniciara nuevamente el registro de datos
en las nuevas tablas
This commit is contained in:
@@ -669,13 +669,10 @@ function run_check_workspace_disabled_code($args, $opts)
|
||||
|
||||
function migrate_new_cases_lists($command, $args) {
|
||||
$workspaces = get_workspaces_from_args($args);
|
||||
$checkOnly = (strcmp($command, "migrate") == 0);
|
||||
|
||||
foreach ($workspaces as $workspace) {
|
||||
if ($checkOnly){
|
||||
print_r("Checking database in ".pakeColor::colorize($workspace->name, "INFO")."\n");
|
||||
} else {
|
||||
print_r("Upgrading database in ".pakeColor::colorize($workspace->name, "INFO")."\n");
|
||||
}
|
||||
print_r("Upgrading database in " . pakeColor::colorize($workspace->name, "INFO") . "\n");
|
||||
|
||||
try {
|
||||
$ws = $workspace->name;
|
||||
$sContent = file_get_contents (PATH_DB . $ws . PATH_SEP . 'db.php');
|
||||
@@ -684,21 +681,16 @@ function migrate_new_cases_lists($command, $args) {
|
||||
} else {
|
||||
$workspace->onedb = true;
|
||||
}
|
||||
//check if is the tables List are empty
|
||||
$changes = $workspace->listFirstExecution('check');
|
||||
if ($workspace->onedb && $changes != true) {
|
||||
$workspace->migrateList($workspace->name);
|
||||
}
|
||||
if ($changes) {
|
||||
if ($checkOnly) {
|
||||
echo "-> List tables are done\n";
|
||||
|
||||
if ($workspace->onedb) {
|
||||
$workspace->migrateList($workspace->name, true);
|
||||
}
|
||||
} else {
|
||||
|
||||
echo "> List tables are done\n";
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user