We just licensed ASP.NET Zero for a new project and configured it to use a MySQL db as documented but when trying to run the existing migrations that ship with the project either using the Migrator project, package manager console or the dotnet cli (with the ef addon) we get errors that the syntax and data types being used on the existing migrations is not compatible with MySQL since they seem to have been coded for SQL Server. Examples: datetime2, nvarchar(max), varbinary(max) to name a few.
Is there an easier way other than modifying all of those migrations to be MySQL compatible to get the initial set of entities, indexes, etc created for a project?
3 Answer(s)
-
0
Hi @Abaco,
I suggest you delete all migrations and create an initial migration for MySQL.
-
0
-
0
Ok, I missed one important piece of information from the instructions:
Remove all migration classes (including DbContextModelSnapshot) under *.EntityFrameworkCore/Migrations folder;