title: Deploying to Azure not running EF Code First Migrations
body: <p>I am running Entity Framework with Code First Migrations. My new release adds a table, modifies a few tables, and run some scripts. This works perfectly when developing locally using update-database.</p>
  
  <p>Upon deployment the new table was not created and I was receiving errors from my client. I attached the debugger to the deployed site to track through what was happening. It reached the controller, went through the normal flow, and upon hitting the first database call to the new (but not actually existing yet) table it hopped into the Configuration class for my migration.</p>
  
  <pre><code>internal sealed class Configuration : DbMigrationsConfiguration&lt;myProject.api.AuthContext&gt;
  {
      public Configuration()
      {
          AutomaticMigrationsEnabled = false;
          MigrationsDirectory = @"Migrations\Auth";
          ContextKey = "myProject.api.AuthContext";
      }
  </code></pre>
  
  <p>So I'm thinking great, all should be well. It goes through all of these, returns to the initial database call, but then that call returns an error, pasted below</p>
  
  <blockquote>
    <p>The model backing the 'AuthContext' context has changed since the
    database was created. Consider using Code First Migrations to update
    the database (<a href="http://go.microsoft.com/fwlink/?LinkId=238269" rel="nofollow noreferrer">http://go.microsoft.com/fwlink/?LinkId=238269</a>).</p>
  </blockquote>
  
  <p>This is surprising since indeed I have enabled code first migrations! Using the standard enable-migrations and add-migration, which work perfectly on my local machine when I issue the update-database command.</p>
  
  <p>1) How can I get my Code First migrations to run once deployed to Azure?</p>
  
  <p><strong>Update 1</strong></p>
  
  <p>Here are my publish settings. For some reason I do not have the checkbox option for: "Execute Code First Migrations" and am guessing that's the issue...
  <img src="https://i.stack.imgur.com/sIq0q.png" alt="enter image description here"></p>