Commit ce692619 authored by Manfred Kutas's avatar Manfred Kutas

ZP-230 Fix hierarchy folder data before starting the migration. Fixed

typo in output.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 13dc3a56
......@@ -154,6 +154,9 @@ class StateMigratorFileToDB {
public function DoMigration() {
print("StateMigratorFileToDB->DoMigration(): Starting migration routine." . PHP_EOL);
try {
// Fix hierarchy folder data before starting the migration
ZPushAdmin::FixStatesHierarchyFolderData();
$this->fsm = new FileStateMachine();
if (!($this->fsm instanceof FileStateMachine)) {
......@@ -170,7 +173,7 @@ class StateMigratorFileToDB {
foreach ($allStates as $stateInfo) {
$state = $this->fsm->GetState($lowerDevid, $stateInfo['type'], $stateInfo['uuid'], (int) $stateInfo['counter'], false);
$this->dbsm->SetState($state, $lowerDevid, $stateInfo['type'], (empty($stateInfo['uuid']) ? NULL : $stateInfo['uuid']), (int) $stateInfo['counter']);
printf("%s\t\tsetting state:%s-%s-%d", PHP_EOL, $stateInfo['uuid'], (empty($stateInfo['uuid']) ? NULL : $stateInfo['uuid']), (int) $stateInfo['counter']);
printf("%s\t\tsetting state:%s-%s-%d", PHP_EOL, $stateInfo['uuid'], (empty($stateInfo['type']) ? NULL : $stateInfo['type']), (int) $stateInfo['counter']);
}
// link devices to users
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment