diff options
Diffstat (limited to 'lib/private/db/mdb2schemamanager.php')
-rw-r--r-- | lib/private/db/mdb2schemamanager.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/private/db/mdb2schemamanager.php b/lib/private/db/mdb2schemamanager.php index 533ed9110e7..397aaf3608a 100644 --- a/lib/private/db/mdb2schemamanager.php +++ b/lib/private/db/mdb2schemamanager.php @@ -77,9 +77,10 @@ class MDB2SchemaManager { * update the database scheme * @param string $file file to read structure from * @param bool $generateSql only return the sql needed for the upgrade + * @param bool $simulate whether to simulate on separate tables instead of the real onces * @return string|boolean */ - public function updateDbFromStructure($file, $generateSql = false) { + public function updateDbFromStructure($file, $generateSql = false, $simulate = false) { $platform = $this->conn->getDatabasePlatform(); $schemaReader = new MDB2SchemaReader(\OC_Config::getObject(), $platform); @@ -89,8 +90,12 @@ class MDB2SchemaManager { if ($generateSql) { return $migrator->generateChangeScript($toSchema); } else { - $migrator->checkMigrate($toSchema); - $migrator->migrate($toSchema); + if ($simulate) { + $migrator->checkMigrate($toSchema); + } + else { + $migrator->migrate($toSchema); + } return true; } } |