title: Unable to update database to match the current model because there are pending changes
body: <p>I have a project built in visual studio 2013 environment with the Db built using EF 5 code first. 
  I have had my APIs working fine for a long time but all of a sudden I started to get this error that says:</p>
  
  <blockquote>
    <p>Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration.</p>
  </blockquote>
  
  <p>when I try to reach the end points of my APIs. I tried adding a new migration and then updating the database but still got the error. I then drop my entire database and recreated with EF. The end points of my APIs started working fine but then again I started getting this error on the web page. I have automatic migration set to true in the configuration file. I really have no idea why this is happening over and over. It's getting me really frustrated. 
  Here's the full stack trace of the error:</p>
  
  <blockquote>
    <blockquote>
      <p></p>
    </blockquote>
    
    <p>[AutomaticMigrationsDisabledException: Unable to update database to
    match the current model because there are pending changes and
    automatic migration is disabled. Either write the pending model
    changes to a code-based migration or enable automatic migration. Set
    DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable
    automatic migration.]<br>
    System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable`1
    pendingMigrations, String targetMigrationId, String lastMigrationId)
    +579    System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration) +445<br>
    System.Data.Entity.Migrations.&lt;>c__DisplayClassc.b__b() +13<br>
    System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action
    mustSucceedToKeepDatabase) +422<br>
    System.Data.Entity.Migrations.DbMigrator.Update(String
    targetMigration) +78<br>
    System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update() +12
    YourTimeSite.Global.ApplyDatabaseMigrations() in
    c:\Users\Ahmed\Desktop\YourTimeSite\YourTimeSite\Global.asax.cs:55<br>
    YourTimeSite.Global.Application_Start(Object sender, EventArgs e) in
    c:\Users\Ahmed\Desktop\YourTimeSite\YourTimeSite\Global.asax.cs:32</p>
    
    <p>[HttpException (0x80004005): Unable to update database to match the
    current model because there are pending changes and automatic
    migration is disabled. Either write the pending model changes to a
    code-based migration or enable automatic migration. Set
    DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable
    automatic migration.]<br>
    System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext
    context, HttpApplication app) +9966013<br>
    System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
    appContext, HttpContext context, MethodInfo[] handlers) +118<br>
    System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
    MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172<br>
    System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
    appContext, HttpContext context) +352<br>
    System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
    appContext) +296</p>
    
    <p>[HttpException (0x80004005): Unable to update database to match the
    current model because there are pending changes and automatic
    migration is disabled. Either write the pending model changes to a
    code-based migration or enable automatic migration. Set
    DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable
    automatic migration.]<br>
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9947380 
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
    +101</p>
  </blockquote>