EF migrations not updating the database automatically

I have EF migration enabled and want to update an existing azure database. When I run the application, I get the following exception:

An exception of type "System.InvalidOperationException" occurred in EntityFramework.dll, but was not processed in user code

Additional Information: The model supporting the "MyContext" context has been changed since the database was created. Consider using Code First Migrations to update your database ( http://go.microsoft.com/fwlink/?LinkId=238269 ).

However, I do have migrations.

Database.SetInitializer(new MigrateDatabaseToLatestVersion<MyContext, Configuration>());

and

internal sealed class Configuration : DbMigrationsConfiguration<MyContext>
{
    public Configuration()
    {
         AutomaticMigrationsEnabled = false;//have also tried true
    }
}

, , , ( ).

, . , Update-Database, , .

, Update-Database Azure.

+3
1

() , , , .

, .

static MyContext()
{
    Database.SetInitializer(new MigrateDatabaseToLatestVersion<MyContext, Configuration>());
}
+2

All Articles