You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More info in issue I posted to peewee_migrate's repo: klen/peewee_migrate#51
I investigated the reason and found the following. In the peewee_migrate, the migration history is created in a following function:
You see I use database object's class method instead of Models.
This led me to wonder if the problem is actually in peewee and model's create_table won't work as expected. Of course it might be an issue with peewee_migrate (and therefore not really your business) as I originally suspected but I'd like to hear if you have any idea why the original code won't work or if there is indeed a bug in peewee :)
Hello, I'm using peewee with peewee_migrate library and encountered a problem today.
When I try to run my migrations, I get error
More info in issue I posted to peewee_migrate's repo: klen/peewee_migrate#51
I investigated the reason and found the following. In the peewee_migrate, the migration history is created in a following function:
Note the
create_table
call. After tinkering around a bit I noticed that the next version works:You see I use
database
object's class method instead ofModel
s.This led me to wonder if the problem is actually in peewee and model's create_table won't work as expected. Of course it might be an issue with peewee_migrate (and therefore not really your business) as I originally suspected but I'd like to hear if you have any idea why the original code won't work or if there is indeed a bug in peewee :)
Finally here is link to peewee_migrate's file containing the snippets above: https://github.com/klen/peewee_migrate/blob/develop/peewee_migrate/router.py
And thanks by the way for creating peewee!
The text was updated successfully, but these errors were encountered: