klen / peewee_migrate

Simple migration engine for Peewee
MIT License
352 stars 86 forks source link

fix invalid repr in fields where default is casted #226

Closed lzgirlcat closed 1 year ago

lzgirlcat commented 1 year ago

Fixes #

if given a field that casts the default the code would have produced unusable migrations, for example this

data = f.BinaryJSONField(default={})

would have been converted to

data = pw_pext.BinaryJSONField(default=<peewee.Cast object at 0x7f96a9751850>, index=True)

now this is fixed

Changes in this PR

cc/ @klen

lzgirlcat commented 1 year ago

hm actually after looking at it a bit more, there's also a lot of issues with args and non-standard fields im closing this pr and will work on a commit that also fixes those