klen / peewee_migrate

Simple migration engine for Peewee

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Migration `--auto` creation requiring `example` and `tests` module.

alekhrycaiko opened this issue · comments

The --auto flag to scaffold a set of models and generate a migration appears broken when a solution lacks an example and tests module.

Based on what I've read in router.py it appears that the culprit is here: https://github.com/klen/peewee_migrate/blob/develop/peewee_migrate/router.py#L81

In this case, I was missing an example module; once I added this, then --auto appears to work. Currently it appears both a example and tests module are required in order for --auto to work.

I'm happy to submit a PR and remove this line if it's desired, but, I'm wondering whether there's something I'm missing concerning this line of code.

Thanks.

Related: #127

@klen @alekhrycaiko Can be closed, PR was merged

Great; thanks!