Open dev-zero opened 8 years ago
Same happens for me when using muffin_peewee.
I have from muffin_peewee import JSONField
in models yet migration too ends up having pw.JSONField
.
It's not hard to manually change the migration but it would be awesome if it would automatically recognize to what a field belongs to. (maybe using inspect? I don't know specific inner workings of this library to give any more suggestions.)
Bump, will this be addressed in any way? Should we just create migrations manually?
I have made a quick pr to fix this problem: https://github.com/klen/peewee_migrate/pull/56
We are using the
BinaryJSONField
from the Playhouse module for PostgreSQL (see http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#postgres-ext).The migrations file contains then the following:
while it should maybe be something like:
In the original models file I have: