Microsoft.EntityFrameworkCore.Migrations.RenameColumn bug

Aiol 1 Reputation point
2021-10-09T04:47:42.677+00:00

using Mysql DB & efCore version 5.0.10.0;
an error happened when I updating DB by cmd: "update-database" in VS2019 Ent.

migration source Code:

//
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Weig",
table: "Book",
newName: "Weight");
}

err Info:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLUMN Weig TO Weight' at line 1.

and other message:
Failed executing DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
ALTER TABLE Book RENAME COLUMN Weig TO Weight;

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
779 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.