As for me, I simply execute migrate
as part of a deployment script. If there aren't any migrations to apply, it's just a no-op. Could you elaborate on your use case for needing to know if migrations are applied or not? Currently, check --deploy
is simply a static analysis of a settings file. The check you proposed would require the ability to connect to the production database which might not be possible from a development machine.
Regarding the second point, makemigrations
gained an --exit option in 1.8 which does what you describe.