Hi,
So I've followed the instructions here. https://aspnetboilerplate.com/Pages/Documents/EF-Core-MySql-Integration
My setup is based on ASP.NET CORE & Angular .NET Core 2.2 v7.1.0 However I had to do a few different things.
BuildWebHost section was ignored as I don't believe that is used any more in .Net Core 2.2
Initially I tried to delete all the migrations as the document mentions and then run add-migration Initial_Migration
So I put all the migrations back from the downloaded package and tried to run them.
There is an error with migrationBuilder.AddColumn<string>( name: "Discriminator", table: "AbpEditions", nullable: false, defaultValue: "");
Failed executing DbCommand (7ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
ALTER TABLE AbpEditions
ADD Discriminator
longtext NOT NULL DEFAULT '';
MySql.Data.MySqlClient.MySqlException (0x80004005): BLOB, TEXT, GEOMETRY or JSON column 'Discriminator' can't have a default value ---> MySql.Data.MySqlClient.MySqlException (0x80004005): BLOB, TEXT, GEOMETRY or JSON column 'Discriminator' can't have a default value
Looking into it they appear to be correct. Default values are not supported for text types.
Commenting out the default to continue and we move onto this file. 5) 20170913133916_Added_SharedMessageId_To_ChatMessage 1) The type specified in there is an MSSQL type only. 2) migrationBuilder.AddColumn<string>( name: "SharedMessageId", table: "AppChatMessages", type: "nvarchar(max)", nullable: true);
Failed executing DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
ALTER TABLE AppChatMessages
ADD SharedMessageId
nvarchar(max) NULL;
MySql.Data.MySqlClient.MySqlException (0x80004005): 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 'max) NULL' at line 1 --->
And there is more if I continue. So the question is. Does ASP.Net Zero really support MySQL. Based on the migration scripts I'm seeing that are on top of Boilerplate. I'm guessing the answer is actually No and not the yes I was previously told.
Thanks Rick