Merge pull request #5391 from owncloud/undefined-property-in-schema-master

removing pointless calls on quoteIdentifier() - reason: name on $tableDi...
This commit is contained in:
Thomas Müller 2013-10-22 22:46:43 -07:00
commit cf61b1a977
1 changed files with 4 additions and 3 deletions

View File

@ -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());
}