diff options
Diffstat (limited to 'lib/private/db.php')
-rw-r--r-- | lib/private/db.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/private/db.php b/lib/private/db.php index 422f783c745..f6854e3e162 100644 --- a/lib/private/db.php +++ b/lib/private/db.php @@ -307,15 +307,21 @@ class OC_DB { /** * update the database schema * @param string $file file to read structure from + * @param bool $simulate whether to simulate the upgrade on separate tables * @throws Exception * @return string|boolean */ - public static function updateDbFromStructure($file) { + public static function updateDbFromStructure($file, $simulate = false) { $schemaManager = self::getMDB2SchemaManager(); try { - $result = $schemaManager->updateDbFromStructure($file); + $result = $schemaManager->updateDbFromStructure($file, false, $simulate); } catch (Exception $e) { - OC_Log::write('core', 'Failed to update database structure ('.$e.')', OC_Log::FATAL); + if ($simulate) { + OC_Log::write('core', 'Database structure update simulation failed ('.$e.')', OC_Log::FATAL); + } + else { + OC_Log::write('core', 'Failed to update database structure ('.$e.')', OC_Log::FATAL); + } throw $e; } return $result; |