-
Notifications
You must be signed in to change notification settings - Fork 153
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
refactor: Remove the foreign key constraint of vfolders.{user,group} #2404
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ed27ce0
to
0c35a76
Compare
op.create_check_constraint( | ||
"ck_vfolders_ownership_type_match_with_user_or_group", | ||
"vfolders", | ||
"(ownership_type = 'user' AND \"user\" IS NOT NULL) OR " | ||
"(ownership_type = 'group' AND \"group\" IS NOT NULL)", | ||
) | ||
op.create_check_constraint( | ||
"ck_vfolders_either_one_of_user_or_group", | ||
"vfolders", | ||
'("user" IS NULL AND "group" IS NOT NULL) OR ("user" IS NOT NULL AND "group" IS NULL)', | ||
) |
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.
How should we handle integrity errors which can occur if some vfolder records have null
values for both user
and group
columns?
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.
We discussed about this issue and we will cover it by introducing placeholder user (a.k.a ghost user)
Merge activity
|
53f34cb
to
82b47f2
Compare
…2404) refs #2376 Remove the foreign/check constraints preventing decoupling of user/vfolder deletions. **Checklist:** (if applicable) - [x] Milestone metadata specifying the target backport version - [x] Mention to the original issue Backported-from: main (24.09) Backported-to: 24.03 Backport-of: 2404
…2404) (#2406) refs #2376 Co-authored-by: achimnol <[email protected]> Remove the foreign/check constraints preventing decoupling of user/vfolder deletions. Backported-from: main (24.09) Backported-to: 24.03 Backport-of: 2404
refs #2376
Remove the foreign/check constraints preventing decoupling of user/vfolder deletions.
Checklist: (if applicable)