Field name case sensitivity bug
Which peewee version are you using? Sorry--I suppose it's clear that you're using 3.x. I've replicated this locally using Postgres. Has to do with some bug in the code assigning column values to instance attributes. Will update and push a fix as soon as I have more info. Thank you so much for taking the time to report this issue, as this was a serious bug!! What happened was the code for constructing model instances was not translating the underlying column name back to the appropriate field name.

I've pushed 3.0.3 to remedy the issue. Thanks! I was using 3.0.2
I have a field name which is uppercase, and the model looks like this:
`foo = IntegerField(column_name='Foo', null=True)`
for some reason the field is always None in the query result.
however, if I change the model to lowercase:
`foo = IntegerField(column_name='foo', null=True)`
it works as expected.
I ran the sql output manually, and it contained numbers instead of null.
the sql query reflects the case of column_name string, and both queries work.
according to the mysql docs field names are never case sensitive:
https://dev.mysql.com/doc/refman/5.6/en/identifier-case-sensitivity.html

the model was created with pwiz, and column_name reflects the case of the database, which I think is correct.
as both queries work, there must be some bug in the result handling in peewee.

Im using PyMySQL and python3.