1
0
mirror of synced 2024-12-13 06:46:03 +03:00

[2.0] Fixed hardcoded database name.

This commit is contained in:
romanb 2009-05-30 10:16:54 +00:00
parent 0b09e50148
commit acec85a412
4 changed files with 4 additions and 5 deletions

View File

@ -190,7 +190,7 @@ class MySqlPlatform extends AbstractPlatform
$sql = "SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = '" . $table . "'";
if ( ! is_null($database)) {
$sql .= " AND table_schema = 'doctrine_tests'";
$sql .= " AND table_schema = '$database'";
}
$sql .= " AND REFERENCED_COLUMN_NAME is not NULL";

View File

@ -221,7 +221,6 @@ abstract class AbstractSchemaManager
$database = $this->_conn->getDatabase();
}
$sql = $this->_platform->getListTableForeignKeysSql($table, $database);
$tableForeignKeys = $this->_conn->fetchAll($sql);
return $this->_getPortableTableForeignKeysList($tableForeignKeys);

View File

@ -16,7 +16,7 @@
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.org>.
* <http://www.doctrine-project.org>.
*/
namespace Doctrine\DBAL\Schema;