Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

AndriySvyryd
Copy link
Member

@AndriySvyryd AndriySvyryd commented Jan 28, 2025

Fixes #35146
Port of #35432

Description

Each EF migration contains a snapshot of the model at the time the migration was created. The snapshots might have been created by an older version of EF, so we need to run them through SnapshotModelProcessor to make them conform to the current version of EF.

Customer impact

In EF9 we changed the way model snapshots are handled to avoid initializing them again. However, when several certain migrations management operations are called in succession this could lead to the snapshots to be processed several times, which will result in an exception most of the times. The workaround is to avoid calling the operations in the same process, but this is not always possible.

How found

Multiple customer reports on 9.0.0

Regression

Yes, from 8.0.

Testing

Test added.

Risk

Low, this only affects design-time code.

@AndriySvyryd AndriySvyryd merged commit 4623a39 into release/9.0-staging Jan 29, 2025
7 checks passed
@AndriySvyryd AndriySvyryd deleted the Issue35146 branch January 29, 2025 18:42
This was referenced Jul 22, 2025
This was referenced Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants