I have an issue with Django migration. I have more than one database in my project. And I want to do the migration for all of them. I wrote my own migrations and if I run the commands below, everything works fine.
python manage.py migrate app-name first_migration
python manage.py migrate --datatbase=db_1 app-name first_migration
python manage.py migrate --datatbase=db_2 app-name first_migration
python manage.py migrate app-name second_migration
python manage.py migrate --datatbase=db_1 app-name second_migration
python manage.py migrate --datatbase=db_2 app-name second_migration
python manage.py migrate app-name third_migration
python manage.py migrate --datatbase=db_1 app-name third_migration
python manage.py migrate --datatbase=db_2 app-name third_migration
But I want to automate it, to run only:
python manage.py migrate
Unfortunately, when I do it I have the below error for migration3
django.db.utils.operationalerror no such column: column_name
But column_name was added in migration2
Have anybody any idea, how can I resolve this issue and run all migration with one command?
In order to migrate all the models, there are 2 commands:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With