Commit 0724b025 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge pull request #457 from deeky666/fix-sqlite-pk-introspection

Fix composite primary key introspection on Sqlite
parents 37e7727c c8706185
...@@ -167,7 +167,7 @@ class SqliteSchemaManager extends AbstractSchemaManager ...@@ -167,7 +167,7 @@ class SqliteSchemaManager extends AbstractSchemaManager
$stmt = $this->_conn->executeQuery("PRAGMA TABLE_INFO ('$tableName')"); $stmt = $this->_conn->executeQuery("PRAGMA TABLE_INFO ('$tableName')");
$indexArray = $stmt->fetchAll(\PDO::FETCH_ASSOC); $indexArray = $stmt->fetchAll(\PDO::FETCH_ASSOC);
foreach ($indexArray as $indexColumnRow) { foreach ($indexArray as $indexColumnRow) {
if ($indexColumnRow['pk'] == "1") { if ($indexColumnRow['pk'] != "0") {
$indexBuffer[] = array( $indexBuffer[] = array(
'key_name' => 'primary', 'key_name' => 'primary',
'primary' => true, 'primary' => true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment