Skip to content

ApplyMigration: The model for context 'xxxxx' has pending changes #36309

@PatrickGermainMcKesson

Description

@PatrickGermainMcKesson

Bug description

When applying migration (even if no new migration) got the above error. This happened since we updated a lot of packages in our solution, including updating EF Core form 8.0.10 to 9.0.

Apply the fix
options.ConfigureWarnings(w => w.Ignore(RelationalEventId.PendingModelChangesWarning))
works , but this hides the real issue.

I was able to reduce our code to the bare minimum and still repro the issue. See attached code as a zip file
Information in the readme.txt

TestMigrations.zip

Your code

See attached zip file

Stack traces


Verbose output


EF Core version

9.0

Database provider

No response

Target framework

No response

Operating system

No response

IDE

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy