peewee_migrate icon indicating copy to clipboard operation
peewee_migrate copied to clipboard

Multiple Models.py files.

Open Ryanb58 opened this issue 6 years ago • 0 comments

Hello, I currently have a situation where I have multiple models.py files separated into their own domains and folders. I was wondering how I can get pw_migrate to auto-generate the migrations. I have tried the following with no such luck.

File Structue:

 - api
 - - migrations
 - - auth
 - - - auth
 - - - - models.py
 - - groups
 - - - groups
 - - - - models.py

I am running the following command:

pw_migrate create --auto -v --database=${DB_URL} "initial"

from the /api/ folder.. and it comes back with this error message:

Can't import models module: True

Does anyone have any suggestions or ideas?

I would be okay having migration folders/files like so:

 - api
 - - auth
 - - - auth
 - - - - models.py
 - - - migrations
 - - groups
 - - - groups
 - - - - models.py
 - - - migrations

However, I would need all the migrations to be able to be run against the same database.

Ryanb58 avatar May 13 '19 20:05 Ryanb58