Skip to content

Conversation

@ajcvickers
Copy link
Contributor

@ajcvickers ajcvickers commented Feb 6, 2023

Port of #29746
Fixes #29985

Description

In EF7, processing seed data in the model snapshot could result in an incorrect provider type when the property has a converter. This change ports a fix already in EF8 to ensure provider types are used correctly.

Customer impact

Many customers reporting that models with seed data will continually update this data on every migration, even though the data never changes. This means every generated migration contains Up and Down steps, even when the migration should be empty. No reasonable workaround.

How found

Multiple customer reports on 7.0.

Regression

Yes.

Testing

New tests added for this kind of seed data in the model snapshot.

Risk

Medium. Significant code changes, but these changes have been in the 8.0 code for several months now, and they are quirked here.

@ajcvickers ajcvickers changed the base branch from main to release/7.0 February 6, 2023 18:56
@dougbu
Copy link
Contributor

dougbu commented Feb 7, 2023

@ajcvickers has this PR been servicing approved but not marked as such❔

@ajcvickers
Copy link
Contributor Author

Not approved yet.

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.

Entity Framework Core 7 keeps creating the same migration for Nullable DateTime field

5 participants