From 089001f2cb1132a5f5cfe5b21ffab7bfd2ea7b48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Poirier=20Th=C3=A9or=C3=AAt?= Date: Thu, 21 May 2015 10:50:04 -0400 Subject: [PATCH] Pass table object instead of table table name On the MySQLPlatform::getDropForeignKeySQL table name will not be escaped if the name is passed instead of the object table itself. Since the getLocalTableName use the localTable property the object is always available, there is no reason not to use it. --- lib/Doctrine/DBAL/Schema/SchemaDiff.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/DBAL/Schema/SchemaDiff.php b/lib/Doctrine/DBAL/Schema/SchemaDiff.php index 35afe1febc0..23eccdad8ca 100644 --- a/lib/Doctrine/DBAL/Schema/SchemaDiff.php +++ b/lib/Doctrine/DBAL/Schema/SchemaDiff.php @@ -154,7 +154,7 @@ protected function _toSql(AbstractPlatform $platform, $saveMode = false) if ($platform->supportsForeignKeyConstraints() && $saveMode == false) { foreach ($this->orphanedForeignKeys as $orphanedForeignKey) { - $sql[] = $platform->getDropForeignKeySQL($orphanedForeignKey, $orphanedForeignKey->getLocalTableName()); + $sql[] = $platform->getDropForeignKeySQL($orphanedForeignKey, $orphanedForeignKey->getLocalTable()); } }