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

Enforce newly created exclusive constraints across tables #3613

Merged
merged 2 commits into from Mar 15, 2022

Conversation

msullivan
Copy link
Member

@msullivan msullivan commented Mar 15, 2022

And on rebases also.

In order to make it work for constraints on abstract links, abstract link views need
to be fixed to include source, which is a bit hacky.

That is a change to the pgsql schema, but we can avoid any trouble from that by
forcing a view update whenever we are generating code that might reference
the source of an abstract link view. I tested that bit manually.

@msullivan msullivan requested a review from elprans March 15, 2022 02:59
@@ -1768,6 +1812,20 @@ def apply(
constraint, schema, context, self.source_context)
self.pgops.add(op)

# If the constraint is being added to existing data,
# we need to enforce it on the existing data. (This only
# matters for
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like truncated comment

@msullivan msullivan merged commit 79f1066 into master Mar 15, 2022
@msullivan msullivan deleted the more-exclusive-trouble branch March 15, 2022 19:42
@msullivan
Copy link
Member Author

Cherry picked to 1.2

msullivan added a commit that referenced this pull request Mar 16, 2022
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.

None yet

2 participants