summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-10-22 22:46:43 -0700
committerThomas Müller <thomas.mueller@tmit.eu>2013-10-22 22:46:43 -0700
commitcf61b1a9776d78f25484d54354b049fe82693b6d (patch)
tree00eda767873c283fb6d9f9cd8d1ee25b131a6c95 /lib/private
parent064fd5ae53b4f3384d040ddf2dcb648cc3c7445f (diff)
parent97aff7c64ee8164a6ba468b6ccb2ee05fa689cf1 (diff)
downloadnextcloud-server-cf61b1a9776d78f25484d54354b049fe82693b6d.tar.gz
nextcloud-server-cf61b1a9776d78f25484d54354b049fe82693b6d.zip
Merge pull request #5391 from owncloud/undefined-property-in-schema-master
removing pointless calls on quoteIdentifier() - reason: name on $tableDi...
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/db/mdb2schemamanager.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/db/mdb2schemamanager.php b/lib/private/db/mdb2schemamanager.php
index fc13e881bff..416e2f55426 100644
--- a/lib/private/db/mdb2schemamanager.php
+++ b/lib/private/db/mdb2schemamanager.php
@@ -61,6 +61,7 @@ class MDB2SchemaManager {
$toSchema = $schemaReader->loadSchemaFromFile($file);
// remove tables we don't know about
+ /** @var $table \Doctrine\DBAL\Schema\Table */
foreach($fromSchema->getTables() as $table) {
if (!$toSchema->hasTable($table->getName())) {
$fromSchema->dropTable($table->getName());
@@ -77,11 +78,10 @@ class MDB2SchemaManager {
$schemaDiff = $comparator->compare($fromSchema, $toSchema);
$platform = $this->conn->getDatabasePlatform();
- $tables = $schemaDiff->newTables + $schemaDiff->changedTables + $schemaDiff->removedTables;
- foreach($tables as $tableDiff) {
+ foreach($schemaDiff->changedTables as $tableDiff) {
$tableDiff->name = $platform->quoteIdentifier($tableDiff->name);
}
-
+
if ($generateSql) {
return $this->generateChangeScript($schemaDiff);
}
@@ -110,6 +110,7 @@ class MDB2SchemaManager {
$schemaReader = new MDB2SchemaReader(\OC_Config::getObject(), $this->conn->getDatabasePlatform());
$fromSchema = $schemaReader->loadSchemaFromFile($file);
$toSchema = clone $fromSchema;
+ /** @var $table \Doctrine\DBAL\Schema\Table */
foreach($toSchema->getTables() as $table) {
$toSchema->dropTable($table->getName());
}