When generating my Tables using Entity Framework Core for MySQL all of the string properties are being created as text columns in MySQL
I am using:
<PackageReference Include="MySql.Data" Version="8.0.8-*" />
<PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.8-*" />
I am trying to use the built in Identity authentication in .net and when I generate the tables I get the error:
BLOB/TEXT column 'NormalizedEmail' used in key specification without a key length
I can work around this by adding:
builder.Entity<IdentityRole>().Property(i => i.NormalizedName)
.HasColumnType("varchar(256)");
But I don't want to do this for every column in the Identity Model nor do I really want columns I add like FirstName being stored as a text column.
Is this a bug in EF Core for MySQL or do I have some configuration wrong?
b.Property<string>("NormalizedUserName").HasMaxLength(256);
– JoAMoS Aug 11 '17 at 6:037.0.7-*
of both MySql.Data and MySql.Data.EntityFrameworkCore and the columns that were generated as text columns are generated as varchar(255). I will just stick with 7.0.7 until I get a better answer. – JoAMoS Aug 11 '17 at 6:06