SapientGuardian / SapientGuardian.EntityFrameworkCore.MySql

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

Exception: The method or operation is not implemented (DropPrimaryKeyOperation) #60

Open cymptom opened 7 years ago

cymptom commented 7 years ago

Hello!

Running this migration:

        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_clients_region_RegionID",
                table: "clients");

            migrationBuilder.DropForeignKey(
                name: "FK_locations_region_RegionID",
                table: "locations");

            migrationBuilder.DropPrimaryKey(
                name: "PK_region",
                table: "region");

            migrationBuilder.RenameTable(
                name: "region",
                newName: "regions");

            migrationBuilder.AddPrimaryKey(
                name: "PK_regions",
                table: "regions",
                column: "ID");
        }

I get the following error:

System.NotImplementedException: The method or operation is not implemented.
   at MySQL.Data.Entity.Migrations.MySQLMigrationsSqlGenerator.Generate(DropPrimaryKeyOperation 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)

I am using:

SapientGuardian.EntityFrameworkCore.MySql (7.1.23) SapientGuardian.MySql.Data (6.9.816) Microsoft.EntityFrameworkCore (1.1.1)

Is this not yet supported?

SapientGuardian commented 7 years ago

Not at this time, sorry. Pull requests are welcomed!