When I run aerich init-db it's ok. Aerich sees all my models and try to create tables. Then I make some changes either in app1.models or app2.models and run aerich migrate I get no changes detected
However if I put the app that I make change in on first place in "apps" field in the tortoise.py config it works fine. For example:
tortoise.py:
and change all my app1.MyModel and app2.MyModel references in relational fields in models to models.MyModel run migrations and it works fine. However it's too annoying to change that all the time when I want to make migrations.
I think I described my problem clear. Any idea what do I do wrong or is it really an issue? If that's so I'd like to hope that this one will be fixed soon.
In app folder I have somethings organized like this: main_app --app1 ----models.py ----views.py ----...... --app2 ----models.py ----views.py ----..... --core ----config.py ----tortoise.py --main.py
In my tortoise.py file I have the tortoise dict:
When I run
aerich init-db
it's ok. Aerich sees all my models and try to create tables. Then I make some changes either in app1.models or app2.models and runaerich migrate
I getno changes detected
However if I put the app that I make change in on first place in "apps" field in the tortoise.py config it works fine. For example: tortoise.py:2nd example: tortoise.py
3rd example: tortoise.py
Seems like aerich only sees changes in the app at the first place in "app" field. I have a workaround, I just put all apps in one dict like:
and change all my
app1.MyModel
andapp2.MyModel
references in relational fields in models tomodels.MyModel
run migrations and it works fine. However it's too annoying to change that all the time when I want to make migrations. I think I described my problem clear. Any idea what do I do wrong or is it really an issue? If that's so I'd like to hope that this one will be fixed soon.