simonw / db-to-sqlite

CLI tool for exporting tables or queries from any SQL database to a SQLite file
Apache License 2.0
368 stars 28 forks source link

MySQL bool columns end up as SQLite BLOB columns upon conversion #49

Open amoeba opened 1 year ago

amoeba commented 1 year ago

I'm trying to use db-to-sqlite to convert a set of MySQL DDL files into an SQLite database. Some of my tables use the BIT(1) type to encode boolean values but the resulting SQLite database ends up with BLOB columns where I think INTEGER would be more natural for SQLite.

This is new territory for me but things I've picked up while researching my issue are:

I think it would be nice if db-to-sqlite could turn BIT(1) fields into INTEGER rather than BLOB because the current behavior is harder to query than it needs to be.

I'm happy to submit a PR for this with tests covering this and any related behavior.