Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[5.0.3] Correctly distinguish between seeds for different owned types #23863

Merged
merged 2 commits into from
Jan 14, 2021

Conversation

AndriySvyryd
Copy link
Member

Fixes #23792

Description

Migrations compared seed data based on the column information, meaning that data was matched as long as the values were mapped to the same columns and in the case of table sharing in some cases this caused data to be mismatched between different entity types. And if one of the types has a read-only property (an alternate key) this results in the row being deleted and inserted again unnecessarily.

Customer Impact

A migration for a model that matches the above condition will always contain operations even if the model hasn't changed. There is no workaround other than removing the read-only properties or manually fixing the migrations.

How found

Customer reported on 5.0.1.

Test coverage

We have added more test coverage in this PR.

Regression?

Yes.

Risk

Low. The fix only affects migrations for models with table sharing and read-only properties.

@ajcvickers ajcvickers added this to the 5.0.x milestone Jan 13, 2021
@leecow leecow modified the milestones: 5.0.x, 5.0.3 Jan 14, 2021
@ajcvickers
Copy link
Contributor

Approved by Tactics for 5.0.3.

@AndriySvyryd AndriySvyryd merged commit f28edd3 into release/5.0 Jan 14, 2021
@AndriySvyryd AndriySvyryd deleted the Issue23792 branch January 14, 2021 21:41
@ajcvickers ajcvickers removed this from the 5.0.3 milestone Jul 11, 2021
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.

3 participants