Backport #625
Sqlite and php5.5 returns "2" for second column in primary key