Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cymptom opened this issue May 2, 2017 · 1 comment

Comments

@cymptom
Copy link

cymptom commented May 2, 2017

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants