The primary key columns don't have to be in the same order as the table columns
Add unittest for primary key columns don't have to be in the same order as the table columns
Code the primary key ordering so it works with sqlite before version 3.7.16
Skip test on sqlite versions where this can't work
Make the column more predictable

Take the column order into account and sort non PK columns last
"0" columns location doesn't matter
Document known issue about reverse engineering primary key order in sqlite
Merge pull request #516 from bartv2/sort-sqlite-pk-columns

The primary key columns don't have to be in the same order as the table columns