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

Update the entity type on check constraints when it's converted to a STET #26112

Merged
merged 2 commits into from
Sep 21, 2021

Conversation

AndriySvyryd
Copy link
Member

@AndriySvyryd AndriySvyryd commented Sep 20, 2021

Fixes #23399

Description

Currently when an entity type is converted to a shared-type entity type the check constraints are just copied over, without updating the back reference to the entity type.

Customer impact

Without this fix migrations throw an error when performing the diff.

How found

Customer

Regression

No.

Testing

Test for this scenario added in the PR.

Risk

Low, the modified code only affects STETs with check constraints - a relatively rare scenario.

@AndriySvyryd
Copy link
Member Author

@Pilchie For approval

@Pilchie
Copy link
Member

Pilchie commented Sep 20, 2021

Approved for EFCore 6.0 pending code review and CI passing.

…ention.cs

Co-authored-by: Brice Lambson <brice@bricelam.net>
@AndriySvyryd AndriySvyryd changed the title [6.0] Update the entity type on check constraints when it's converted to a STET Update the entity type on check constraints when it's converted to a STET Sep 21, 2021
@AndriySvyryd AndriySvyryd merged commit 3697418 into release/6.0 Sep 21, 2021
@AndriySvyryd AndriySvyryd deleted the Issue23399 branch September 21, 2021 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migration fails when adding a check constraint on a second owned entity
3 participants