Description:
DropProcedureOperation and AlterProcedureOperation are not implemented in MySqlMigrationSqlGenerator.
When MapToStoredProcedures is used and you want to make an upgrade can throw an exception.
How to repeat:
1- Create a simple context and generate the database using Enable-Migrations.
2- Modify the file Migrations/Configuration.cs
public Configuration()
{
AutomaticMigrationsEnabled = true;
}
3- Add MapToStoredProcedures to an entity
For example:
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<Car>().MapToStoredProcedures();
}
4- Execute Update-Database
5- Add a new property to the entity.
6- Execute Update-Database again
Suggested fix:
Add DropProcedureOperation and AlterProcedureOperation in MySqlMigrationSqlGenerator.
#if EF6
_dispatcher.Add("HistoryOperation", (OpDispatcher)((op) => { return Generate(op as HistoryOperation); }));
_dispatcher.Add("CreateProcedureOperation", (OpDispatcher)((op) => { return Generate(op as CreateProcedureOperation); }));
_dispatcher.Add("UpdateDatabaseOperation", (OpDispatcher)((op) => { return Generate(op as UpdateDatabaseOperation); }));
#endif