Roman Sidorov Roman Sidorov - 1 month ago 16
MySQL Question

MySQL Table doesn't exist when deployed on AWS

I deployed my .net core app to aws, but cannot figure out how to make initial migration to create tables.
Is there some equivalent to

dotnet ef migrations add Initial
dotnet ef database update
on aws to create tables when use Code First approach?
My code failing on line:

if (context.Record.Any())
{
return; // DB has been seeded
}

Answer

Issue solved by changing MySQL connector from MySql.Data.EntityFrameworkCore to SapientGuardian.EntityFrameworkCore.MySql. All migrations then performed using default commands.