I am trying to migrate the database, and there is an issue I can't solve. Basically I have to migrate also the existing migrations which are bound to Mysql implementation. Here is one example of the problem:
migrationBuilder.CreateTable(
name: "AspNetUserClaims",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
UserId = table.Column<string>(nullable: false),
ClaimType = table.Column<string>(nullable: true),
ClaimValue = table.Column<string>(nullable: true)
},
"MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn"
In each migration the same problem throws error and I couln't find in any documentation how do I change this for Postgre. I guess this specifies the Primary Key autogeneration method.
P.S.
This is the thrown error, because I switched from Pomelo.Mysql to npg.Postgre database provider for ef core:
Error CS0103 The name 'MySqlValueGenerationStrategy' does not exist in the current context BingoAPI D:\Bingo\BingoAPI\Migrations\20200420230201_IdentityUser.cs 76 Active