Skip to content

Commit

Permalink
Rename unique index
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-sauer authored and lunny committed Dec 14, 2023
1 parent 3dec832 commit 690bcfa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions models/issues/issue_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
// IssueUser represents an issue-user relation.
type IssueUser struct {
ID int64 `xorm:"pk autoincr"`
UID int64 `xorm:"INDEX unique(uidtoissue)"` // User ID.
IssueID int64 `xorm:"INDEX unique(uidtoissue)"`
UID int64 `xorm:"INDEX unique(uid_to_issue)"` // User ID.
IssueID int64 `xorm:"INDEX unique(uid_to_issue)"`
IsRead bool
IsMentioned bool
}
Expand Down
4 changes: 2 additions & 2 deletions models/migrations/v1_22/v283.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

func AddCombinedIndexToIssueUser(x *xorm.Engine) error {
type IssueUser struct {
UID int64 `xorm:"INDEX unique(uidtoissue)"` // User ID.
IssueID int64 `xorm:"INDEX unique(uidtoissue)"`
UID int64 `xorm:"INDEX unique(uid_to_issue)"` // User ID.
IssueID int64 `xorm:"INDEX unique(uid_to_issue)"`
}

return x.Sync(&IssueUser{})
Expand Down

0 comments on commit 690bcfa

Please sign in to comment.