-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix the way replace_metadata drops event triggers (fix #5461) #6137
Fix the way replace_metadata drops event triggers (fix #5461) #6137
Conversation
Deploy preview for hasura-docs ready! Built with commit c5a4bbf |
0ef5e90
to
33d5fe8
Compare
33d5fe8
to
f09d0cf
Compare
Previously, we were relying on "ON UPDATE CASCADE" on the foreign key constraint to do this automatically.
0e1696b
to
0c62360
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@lexi-lambda |
@rakeshkky This PR should be merged regardless because we need to cherry-pick it for v1.3.3 The new event trigger changes should happen on top of this. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Server LGTM. However, these changes will become obsolete with metadata storage separation (see #5797).
Description
This PR fixes #5461 by changing the way
replace_metadata
updates event triggers. Instead of dropping and recreating them, HGE now performs a diff-and-patch against the existing metadata, which goes through the appropriate code paths to update the associated SQL functions and archive events.Affected components
Related Issues
#5461
Server checklist
Metadata
Does this PR add a new Metadata feature?
GraphQL
Breaking changes