-
Notifications
You must be signed in to change notification settings - Fork 85
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
Relation "migratehistory" already exists #51
Comments
After some tinkering I found that the following modification seems to work:
and I posted an issue about it to peewee's repo: coleifer/peewee#1314 |
Ok, I found the issue. Problem was that I have multiple schemas in my database and at the moment peewee_migrate seems to add
So for now the solution is to add following to the
This is a bit dirty however. Would it be possible to somehow configure |
Hello @Tumetsu, Good point. Sorry for the late response, but I've added schema param to Router. And now the option is configurable. |
When I try to run all unapplied migrations, I get the following error:
My python script to run all migrations:
After quick investigation to the source of peewee_migrate I found this from
BaseRouter
:Looks like it tries to create the table always because of the last line before return which then fails if I have already migrated something to the db and the table exists. Why is that? Am I using this wrong somehow?
My peewee and peewee_migrate versions:
Using Python 3.5
And full stack trace:
The text was updated successfully, but these errors were encountered: