title: How does django know which migrations have been run?
body: <p>How does django know whether a migration has been applied yet? It usually gets it right, but when it doesn't I don't ever know where to start troubleshooting.</p>