sqlite database stores 'true'/'false' in INT type
> I'm not very familiar with databases, so I don't know if this that Mendeley does is a very unusual behavior, or why wouldn't they just store 0/1, but this is out of my control. So I was wondering which could be the best approach to deal with this issue.

This is very bad behavior, in my opinion.

You can do one of several things:

* Update the tables, e.g. `update my_table set my_col = case when my_col='true' then 1 else 0 end;`
* Implement a custom field type that correctly handles the strings "true" / "false"

There's no excuse for monkey-patching `IntegerField.adapt` in my opinion...just subclass. It's Python.
I'm using peewee to handle the database stored by the Mendeley app.
It turns out in its database Mendeley defines binary fields as INT but populate its values with 'true'/'false' strings.
As a result, when reading this database through the models automatically imported by pwiz (which parses these fields as 'IntegerField'), the program throws an exception as it tries to cast `int('true')`.
I'm not very familiar with databases, so I don't know if this that Mendeley does is a very unusual behavior, or why wouldn't they just store 0/1, but this is out of my control. So I was wondering which could be the best approach to deal with this issue.
Should I force the `IntegerField.adapt` method to check if the string is 'true' or 'false' in case of exception? This seems a little invasive though wrt peewee, that's why I ask for advice here :)