Skip to content
Permalink
Browse files

Improving performance when quering information_schema

  • Loading branch information...
darxmac committed Sep 16, 2014
1 parent 6e8f607 commit 1b1a0dbe728f08918182b0bb1fb3a9d2b5b80b41
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Database/Schema/MysqlSchema.php
@@ -213,9 +213,9 @@ public function describeForeignKeySql($tableName, $config) {
$sql = 'SELECT * FROM information_schema.key_column_usage AS kcu
INNER JOIN information_schema.referential_constraints AS rc
ON (kcu.CONSTRAINT_NAME = rc.CONSTRAINT_NAME)
WHERE kcu.TABLE_SCHEMA = ? AND kcu.TABLE_NAME = ?';
WHERE kcu.TABLE_SCHEMA = ? AND kcu.TABLE_NAME = ? and rc.TABLE_NAME = ?';
return [$sql, [$config['database'], $tableName]];
return [$sql, [$config['database'], $tableName, $tableName]];
}
/**

0 comments on commit 1b1a0db

Please sign in to comment.
You can’t perform that action at this time.