diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-05-24 22:00:42 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-06-24 22:38:19 +0200 |
commit | 144a8eb01f29f4f6ebb8117a3d6936722732ea49 (patch) | |
tree | 70632101fb0a85e870a43cc1af67296603826aee | |
parent | 23da0c7d188b4c0a119e16c5be48ce322df29068 (diff) | |
download | nextcloud-server-144a8eb01f29f4f6ebb8117a3d6936722732ea49.tar.gz nextcloud-server-144a8eb01f29f4f6ebb8117a3d6936722732ea49.zip |
Quote tablenames
-rw-r--r-- | lib/db/schema.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/db/schema.php b/lib/db/schema.php index 89ab2381615..d862f3d25c9 100644 --- a/lib/db/schema.php +++ b/lib/db/schema.php @@ -63,6 +63,13 @@ class OC_DB_Schema { $comparator = new \Doctrine\DBAL\Schema\Comparator(); $schemaDiff = $comparator->compare($fromSchema, $toSchema); + $platform = $conn->getDatabasePlatform(); + $tables = $schemaDiff->newTables + $schemaDiff->changedTables + $schemaDiff->removedTables; + foreach($tables as $tableDiff) { + $tableDiff->name = $platform->quoteIdentifier($tableDiff->name); + } + + //$from = $fromSchema->toSql($conn->getDatabasePlatform()); //$to = $toSchema->toSql($conn->getDatabasePlatform()); //echo($from[9]); |