Fix sqlite autoincrement detection
Separate test into own function
Merge pull request #515 from bartv2/fix-pk-autoincrement-detection

Fix sqlite autoincrement detection