In fabfile.py, I use something similar to the following to install dependencies and to migrate the changes to the new model
run("pip install -r ../deployment/pip/deploy.txt")
run("python manage.py migrate --settings=project.settings.prod")
When I upgrade the 3rd party apps which have migrations in the current version, but did not have in the previous one, my understanding is that I have to run ./manage.py migrate --fake <app_name>
.
What would be a good solution with which a single deployment script (with Fabric) could pull the code from GIT repo, install new dependencies, take care of migrations and IF there are 3rd party apps that started using migrations recently, then run fake migrations on those.
Any pointers would be highly appreciated.
Thank you