\OCP\Util::writeLog('Encryption library', "Enter migration mode for initial encryption for user " . $this->userId, \OCP\Util::INFO);
} else {
\OCP\Util::writeLog('Encryption library', "Could not activate migration mode for " . $this->userId . ", encryption aborted", \OCP\Util::ERROR);
}
if ($manipulatedRows === 1) {
$return = true;
\OCP\Util::writeLog('Encryption library', "Start migration to encryption mode for " . $this->userId, \OCP\Util::INFO);
} else {
\OCP\Util::writeLog('Encryption library', "Another process already performs the migration for user " . $this->userId, \OCP\Util::WARN);
\OCP\Util::writeLog('Encryption library', "Could not activate migration mode for " . $this->userId . ". Probably another process already started the initial encryption", \OCP\Util::WARN);
}
\OC_DB::commit();
return $return;
}
@ -1126,29 +1088,19 @@ class Util {
$return = false;
$transaction = \OC_DB::beginTransaction();
if ($transaction === false) {
\OCP\Util::writeLog('Encryption library', "Your database migration doesn't support transactions", \OCP\Util::WARN);
}
$migrationStatus = $this->getMigrationStatus();
if ($migrationStatus === self::MIGRATION_IN_PROGRESS) {