Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evolve does not appear to isolate models by db connection #49

Open
malaney opened this issue May 28, 2020 · 1 comment
Open

Evolve does not appear to isolate models by db connection #49

malaney opened this issue May 28, 2020 · 1 comment

Comments

@malaney
Copy link

malaney commented May 28, 2020

I am currently using peewee to manage models in two separate db connections. I'd like to be able to run migrations for these two connections separately. But peewee-db-evolve seems to populate all_models with every model ever included in my app whether it is connected to the db connection A or db connection B. Would it make sense to only migrate models associated with db connection A when calling A.evolve?? Right now it seems to calculate diffs across all models on both A and B.

@silasary
Copy link
Contributor

You want to call peeweedbevolve.clear() before you define your models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants