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

Multiple Models.py files. #139

Open
Ryanb58 opened this issue May 13, 2019 · 0 comments
Open

Multiple Models.py files. #139

Ryanb58 opened this issue May 13, 2019 · 0 comments

Comments

@Ryanb58
Copy link
Contributor

Ryanb58 commented May 13, 2019

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.

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

1 participant