Skip to content

[release/3.1] Fix issue where property with value generated on add is reseeded in every migration #22760

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 13, 2020

Conversation

AndriySvyryd
Copy link
Member

Fixes #21146

Description

When using ValueGeneratedOnAdd on a property that is seeded it causes redundant UpdateData calls in every subsequent migration to be generated

This is porting a 5.0 fix for #21661 (a8f0f4c) to 3.1.x

Customer Impact

This issue makes generating subsequent migrations very tedious as the redundant entries need to be found and removed manually, which is error-prone.

How found

Multiple customer reports on 3.1.6.

Test coverage

This PR adds a test for the affected scenario.

Regression?

Yes, from 3.0.3

Risk

Low. The affected code path is only used for data seeding and the fix was validated in 5.0.

@AndriySvyryd AndriySvyryd requested a review from a team September 25, 2020 17:56
@ajcvickers ajcvickers added this to the 3.1.x milestone Sep 28, 2020
@ajcvickers
Copy link
Contributor

@AndriySvyryd Approved by Tactics.

@smitpatel
Copy link
Contributor

@AndriySvyryd - Are you planning to merge this soon? (I am assuming new branding changes went in release/3.1 so that branch is open for next patch updates)

@AndriySvyryd
Copy link
Member Author

@wtgodbe @dougbu Can you confirm that the branch is open?

@wtgodbe
Copy link
Member

wtgodbe commented Oct 13, 2020

Yes, the branch is open. I was planning on going through and merging servicing-apprpoved PRs in all 4 repos once I get the last branding update in (in aspnetcore-tooling), but since this repo has already done its branding I can get a head start by merging this one now.

@wtgodbe wtgodbe merged commit 3a237f6 into release/3.1 Oct 13, 2020
@wtgodbe wtgodbe deleted the Issue21146 branch October 13, 2020 19:10
@ajcvickers ajcvickers removed this from the 3.1.10 milestone Dec 11, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants