Skip to content

Instantly share code, notes, and snippets.

@pysco68
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pysco68/452e4d870fbcf7582d29 to your computer and use it in GitHub Desktop.
Save pysco68/452e4d870fbcf7582d29 to your computer and use it in GitHub Desktop.
Enable migrations and add the migrations code generator
# run this in the Package manager console
Enable-Migrations
internal sealed class Configuration : DbMigrationsConfiguration<Application.Model.ApplicationContext>
{
public Configuration()
{
AutomaticMigrationsEnabled = false;
// add this
SetSqlGenerator("MySql.Data.MySqlClient", new MySql.Data.Entity.MySqlMigrationSqlGenerator());
}
/* ... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment