summaryrefslogtreecommitdiffstats
path: root/lib/private/db.php
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2014-06-05 22:54:27 +0200
committerGeorg Ehrke <developer@georgehrke.com>2014-06-05 22:54:27 +0200
commit0fe8f77c1748d167e115680346ae98bba78da38d (patch)
treea456ff35bb2da1a2778f18ccab1ade63e9aaddda /lib/private/db.php
parentfad3bd7fc0c094bd16e07708557cd1a7676889cd (diff)
parente1beb8c6c38d48eb923ed323dea25110e4bbacfd (diff)
downloadnextcloud-server-0fe8f77c1748d167e115680346ae98bba78da38d.tar.gz
nextcloud-server-0fe8f77c1748d167e115680346ae98bba78da38d.zip
Merge branch 'master' into update_shipped_apps_from_appstore
Conflicts: lib/private/app.php settings/templates/apps.php
Diffstat (limited to 'lib/private/db.php')
-rw-r--r--lib/private/db.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/private/db.php b/lib/private/db.php
index 422f783c745..82affe293ed 100644
--- a/lib/private/db.php
+++ b/lib/private/db.php
@@ -322,6 +322,23 @@ class OC_DB {
}
/**
+ * simulate the database schema update
+ * @param string $file file to read structure from
+ * @throws Exception
+ * @return string|boolean
+ */
+ public static function simulateUpdateDbFromStructure($file) {
+ $schemaManager = self::getMDB2SchemaManager();
+ try {
+ $result = $schemaManager->simulateUpdateDbFromStructure($file);
+ } catch (Exception $e) {
+ OC_Log::write('core', 'Simulated database structure update failed ('.$e.')', OC_Log::FATAL);
+ throw $e;
+ }
+ return $result;
+ }
+
+ /**
* drop a table - the database prefix will be prepended
* @param string $tableName the table to drop
*/