Mysql
 SQL >> Datenbank >  >> RDS >> Mysql

Specified Key Was Too Long in ASP.NET Identity MySQL beheben

Die Ursache sind zu lange String-Spalten für UserName, Email und Role Name.

Mit HasMaxLength(255) im IdentityModel bleiben die Indizes innerhalb des 767-Byte-Limits.

Zusätzlich kann DbConfigurationType für MySQL das Migrationsproblem lösen.