I am working on a project with C #, Entity Framework and MySQL. I wanted to know if you could help me with a "problem" I'm having with migrations. I was working with MySQL version 5.6 and go to version 5.7, the problem (if you can say problem) is that now for the data type Guid assigns me a default value, which I need you not to do
MySQL 5.6
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "UserId",
table: "Policy",
nullable: false
}
MySQL 5.7
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "CompanyId",
table: "Policy",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
}
How could I avoid assigning a default value in the migration without having to edit the migration file? Could it?