The create_foreign_key() function appears to be referencing an attribute that doesn't exist:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "env/local/lib/python2.7/site-packages/peewee.py", line 2003, in create_table
File "env/local/lib/python2.7/site-packages/peewee.py", line 1739, in create_foreign_key
AttributeError: 'ForeignKeyField' object has no attribute 'to'
This occurs while running create_table() on a model that has a ForeignKeyField().
Running peewee version 2.0.2.
Fixing references in MySQLDatabase to "field.to" that was changed to
"field.rel_model" -- fixes #120
Thanks for fixing this one so quickly! When is the next release planned? Right now I'm using the master branch to get around this bug.