SapientGuardian / SapientGuardian.EntityFrameworkCore.MySql

MySQL database provider for Entity Framework Core
52 stars 9 forks source link

exception: The method or operation is not implemented on database update #40

Open szymongaertig opened 7 years ago

szymongaertig commented 7 years ago

Should migrations work properly on EF 1.1 ?

I use:

"SapientGuardian.EntityFrameworkCore.MySql" : "7.1.15"
"Microsoft.EntityFrameworkCore": "1.1.0",

after invoking update db command:

dotnet ef database update --context DbContextClassName

if get:

System.NotImplementedException: The method or operation is not implemented.
   at MySQL.Data.Entity.Migrations.MySQLMigrationsSqlGenerator.Generate(EnsureSchemaOperation operation, IModel model, MigrationCommandListBuilder builder)
   at Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator.Generate(MigrationOperation operation, IModel model, MigrationCommandListBuilder builder)

   at Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator.Generate(IReadOnlyList`1 operations, IModel model)
   at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.GenerateUpSql(Migration migration)
   at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
   at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String contextType)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_1.<.ctor>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
The method or operation is not implemented.
SapientGuardian commented 7 years ago

It could be that your migration is trying to do something that is not yet supported. Does it work for you with EF 1.0?

zhangxuan1107 commented 4 years ago

how to do for this bug?

SapientGuardian commented 4 years ago

This library is no longer maintained. There are many alternatives which are far more complete and better tested, such as Pomelo.EntityFrameworkCore.MySql