sebastianbergmann / dbunit

DbUnit port for PHP/PHPUnit.
https://phpunit.de/
Other
225 stars 186 forks source link

SQLite Multiple Column Primary Key #176

Closed JohnWE closed 8 years ago

JohnWE commented 8 years ago

When you have a primary key with multiple columns, getTablePrimaryKeys() only returns the first column, not all of them.

This is due to line 99 which only checks for the value 1. It's "0" when the column is not a part of the primary key, and the index inside the key otherwise. So only the first column shows up because it's the only one with the value "1".

See: http://sqlite.org/pragma.html#pragma_table_info