Entity Framework 6 - Does not create tables when enabling Migrations

I don't know that this is EntityFramework's bug or not, but when I made rename the namespace of Migration Configuration class from default (Projectname/Migrations) to any none default name, migration works well.


Context.Database.Create() will not execute migrations! It only creates empty db. To Update database from code to latest version you need to use DbMigrator.Update method:

var migrator = new DbMigrator(new MyMigrationsConfiguration());
migrator.Update();

Alternatively you might use MigrateDatabaseToLatestVersion

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

It is described in details here: http://msdn.microsoft.com/en-us/data/jj591621.aspx#initializer