klen / peewee_migrate

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

Fix self-referencing foreign keys #203

Closed norbertcyran closed 3 years ago

norbertcyran commented 3 years ago

Fixes #202

With this PR, auto migrations will work correctly for models with self-referencing foreign keys. Right now, applying the migration fails because of KeyError (model is not yet in migrator.orm dict)

cc/ @klen

klen commented 3 years ago

@norbertcyran Great! Thank you!