title: dbo.__MigrationHistory table not being updated when publishing from Visual Studio
body: <p>I am having an issue with the dbo.__MigrationHistory table not being updated with new database migrations, BUT the actual database itself is correctly updated with relevant changes. This means the site won't load due to it spotting a change in the context - and I have to manually insert the new changes into the dbo.__MigrationHistory table to make it load.</p>
  
  <p>When I publish to Azure from Visual Studio everything works fine in my PRODUCTION site.  However, I have the issue only on my TEST site (which has a different publish profile).</p>
  
  <p>I have checked the EXECUTE CODE FIRST MIGRATIONS box in the publish profile on both the TEST and PRODUCTION publish profiles.  Indeed, both publish profiles appear to be identical except for pushing to a different site.</p>
  
  <p>In case it helps - whenever this happens my localdb SqlServer database also becomes unattached during the publish.  So on my local PC I have to then go back and reattach the .mdf database file in SQL server management studio.</p>
  
  <p>Any help / advice you can offer would be amazing.</p>