Make the logic for manipulating sqlite data types a bit more solid
Merge pull request #1058 from janmeier/sqliteweirdness

Make the logic for manipulating sqlite data types a bit more solid