I have this in place for my production platform, note that the command is only executed when the build is done in something other then debug mode.
#if !DEBUG
Database.SetInitializer(new MigrateDatabaseToLatestVersion<VerbekeContext, Default.Migrations.Configuration>());
#endif
this is added in my global.asax of an MVC project in the startup function, so if you have any other application you should execute this @ startup
Or you could set the AutomaticMigrationsEnabled to true in the configuration.cs in the migrations folder. If you add the debug switch, set it to false in debug and true in other build modes.
namespace Default.Migrations
{
using System.Data.Entity.Migrations;
public sealed class Configuration : DbMigrationsConfiguration<Context>
{
public Configuration()
{
AutomaticMigrationsEnabled = false;
}
protected override void Seed(Context context)
{
///
}
}
}