Skip to content

Old 2.0 Migrations with Foreign Key or Index Identifiers longer than 64 characters does not work properly in 2.1 #590

@TriJetScud

Description

@TriJetScud

Steps to reproduce

Create a database migration that auto generates foreign key constraints or index identifier that is longer than 64 characters.

The issue

Prior to commit 1191bc2, foreign key or index identifiers that is greater than 64 characters is truncated when the migration script is being generated by the database provider. Since the LimitLength() string extension along with it's use has been removed from the codebase, older migrations generated with the 2.0 EF Core provider that happens to have an auto generated FK or index constraint that is longer than 64 characters are now unusable.

As with EF Core 2.1, the ORM now gives Database Providers the ability to pre-emptively limit the length of the generated identifiers at the provider level as opposed to being limited when the migration script is generated. Currently, it seems like Pomelo's EF Core provider now takes advantage of this feature without regard to older migrations generated in the 2.0 branch.

Workaround

Remove all migrations generated with the old 2.0 database provider and start fresh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions