Skip to content

Commit

Permalink
DBAL-34 - MySQLPlatform::getListTableForeignKeys() bug with MySQL < 5…
Browse files Browse the repository at this point in the history
….1.16
  • Loading branch information
beberlei committed Jul 27, 2010
1 parent 8a8ee96 commit ce1e5f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ public function getListTableForeignKeysSQL($table, $database = null)
" c.table_name = '$table' */ WHERE k.table_name = '$table'";

if ($database) {
$sql .= " AND k.table_schema = '$database' AND c.constraint_schema = '$database'";
$sql .= " AND k.table_schema = '$database' /*!50116 AND c.constraint_schema = '$database' */";
}

$sql .= " AND `REFERENCED_COLUMN_NAME` is not NULL";
$sql .= " AND k.`REFERENCED_COLUMN_NAME` is not NULL";

return $sql;
}
Expand Down

0 comments on commit ce1e5f0

Please sign in to comment.