diff options
author | sebastian-sauer <sauer.sebastian@gmail.com> | 2023-12-14 10:26:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-14 09:26:59 +0000 |
commit | e08f1a9cbd582c73918e401eeba36261627f44a7 (patch) | |
tree | 66bad379d72000725cda4385fc6fe31306dfce4a /models/issues/issue_user.go | |
parent | e85db6c8c37bd0643deb704e857d369288a3ca0f (diff) | |
download | gitea-e08f1a9cbd582c73918e401eeba36261627f44a7.tar.gz gitea-e08f1a9cbd582c73918e401eeba36261627f44a7.zip |
Add combined index for issue_user.uid and issue_id (#28080)
fixes #27877
---------
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'models/issues/issue_user.go')
-rw-r--r-- | models/issues/issue_user.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/issues/issue_user.go b/models/issues/issue_user.go index 24bb74648d..6b59e0725e 100644 --- a/models/issues/issue_user.go +++ b/models/issues/issue_user.go @@ -14,8 +14,8 @@ import ( // IssueUser represents an issue-user relation. type IssueUser struct { ID int64 `xorm:"pk autoincr"` - UID int64 `xorm:"INDEX"` // User ID. - IssueID int64 `xorm:"INDEX"` + UID int64 `xorm:"INDEX unique(uid_to_issue)"` // User ID. + IssueID int64 `xorm:"INDEX unique(uid_to_issue)"` IsRead bool IsMentioned bool } |