How to know when to run update-database?
<p>With EF code-based migrations, after performing a "Get Latest Version" of the code, it isn't always obvious if you have migrations to run. You could look in the migrations folder to see if there are any new ones, or you can just wait until something breaks and perhaps it will become obvious that your DB is out of date. Neither of those options are appealing to me.</p>

<p>I don't want to enable automatic migrations, and I also prefer not to have migrations always run on application startup because I may not be ready for them yet. I could run <em>update-database</em> every time I get latest (and don't have pending DB changes of my own), but that would be unnecessary most of the time.</p>

<p>Is there a simple way to know that my DB is out of date, particularly after pulling down the latest code?</p>

<p>Ideally I'm envisioning some sort of build event that only happens after a get latest.</p>