Skip to content

EntityFramework Migration for ASP.Net Core Identity creates Key without key length #28055

Open
@jonasarcangel

Description

@jonasarcangel

Using ASP.Net Core Identity and EntityFramework, the migration code generated created key (for tables like ApplicationUser, from IdentityUser) with Id and no key length.

Getting an error when running with MySql:

MySqlConnector.MySqlException (0x80004005): BLOB/TEXT column 'Id' used
in key specification without a key length

For example:

    modelBuilder.Entity("MyProject.ApplicationUser", b =>
        {
            b.Property<string>("Id")
                .HasColumnType("TEXT");

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected-fewThis issue impacts only small number of customersarea-identityIncludes: Identity and providersenhancementThis issue represents an ask for new feature or an enhancement to an existing oneseverity-minorThis label is used by an internal tool

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions