-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 combined index for issue_user.uid and issue_id #28080
Add combined index for issue_user.uid and issue_id #28080
Conversation
@sebastian-sauer could you test if the suggested changes still fix the issue - that should be the proper way |
yes - will do it now. |
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.
I thought you wanted a combined INDEX
?
Why is it suddenly a unique constraint
?
It's now a combined unique index. I didn't see a reason against having this a unique combined index - is there any? |
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.
Overall LGTM.
It's also feasible to drop the INDEX(uid)
, because UNIQUE(a,b)
also works for INDEX(a)
.
But maybe users database has duplicated records so that the migration may fail? |
Not sure how to solve this - if there is a (from my point of view) data error (or is there any allowed way to get duplicate records?) the unique constraint will fail. I'm happy to not make it a unique index, but how do the other reviewers think about this? |
Maybe |
Co-authored-by: 6543 <6543@obermui.de>
e5b795f
to
63e5c99
Compare
Pushed my proposal. |
* giteaofficial/main: Polyfill SubmitEvent for PaleMoon (go-gitea#28441) Fix Chinese translation of config cheat sheet[API] (go-gitea#28472) Add combined index for issue_user.uid and issue_id (go-gitea#28080) Fix documents for "custom/public/assets/" (go-gitea#28465) Only use SHA256 feature when git >= 2.42 (go-gitea#28466)
fixes go-gitea#27877 --------- Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
fixes go-gitea#27877 --------- Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
fixes #27877