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

Add a convention to update check constraints #15551

Closed
AndriySvyryd opened this issue May 1, 2019 · 5 comments
Closed

Add a convention to update check constraints #15551

AndriySvyryd opened this issue May 1, 2019 · 5 comments
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@AndriySvyryd
Copy link
Member

We should update the schema/table name for the constraint when it changes for the entity type.

@MarinaRybalko
Copy link

Can you provide more details?
I would like to do it.

@AndriySvyryd
Copy link
Member Author

AndriySvyryd commented May 1, 2019

You would need to create a convention that implements IEntityTypeAnnotationChangedConvention and reacts to any schema/table changes, finds any check constraints associated with that table and updates its schema/table to the new values.
But I am currently changing the conventions API, so it's best to hold off for about a week.

@ajcvickers ajcvickers added this to the 3.0.0 milestone May 3, 2019
@AndriySvyryd
Copy link
Member Author

An alternative solution would be to store the check constraint annotations on entity types instead of the model.

@Muppets
Copy link
Contributor

Muppets commented May 12, 2019

As @AndriySvyryd mentioned, I believe the work I did in this PR to store constraint annotations on entity types will resolve this issue.

@AndriySvyryd
Copy link
Member Author

Fixed in #15688

@AndriySvyryd AndriySvyryd removed their assignment May 15, 2019
@AndriySvyryd AndriySvyryd added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label May 15, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0, 3.0.0-preview6 Jun 5, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0-preview6, 3.0.0 Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

4 participants