EllisLab/CodeIgniter — pull request #1931 by AgentConundrum (2012-10-26 10:06:12+00:00)
Title: Fixed creation of non-PK composite keys.

Modified CI_DB_forge::add_key() to only recursively add each key in an passed array of keys if they're meant to be primary keys.

Otherwise, the array needs to be maintained so that composite keys are preserved.

Tested against MySQL database only, using mysql, mysqli, and pdo drivers (PDO driver validated semi-manually due to another error outside of the scope of this PR).