Skip to content

Commit 51fbccd

Browse files
author
James
committed
remove CommitStatus.Index field, and update db index to use ID instead of Index.
1 parent 25f8970 commit 51fbccd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

models/commit_status.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@ import (
2121

2222
// CommitStatus holds a single Status of a single Commit
2323
type CommitStatus struct {
24-
ID int64 `xorm:"pk autoincr"`
25-
Index int64 `xorm:"INDEX UNIQUE(repo_sha_index)"`
26-
RepoID int64 `xorm:"INDEX UNIQUE(repo_sha_index)"`
24+
ID int64 `xorm:"pk autoincr INDEX UNIQUE(repo_sha_id)"`
25+
RepoID int64 `xorm:"INDEX UNIQUE(repo_sha_id)"`
2726
Repo *Repository `xorm:"-"`
2827
State api.CommitStatusState `xorm:"VARCHAR(7) NOT NULL"`
29-
SHA string `xorm:"VARCHAR(64) NOT NULL INDEX UNIQUE(repo_sha_index)"`
28+
SHA string `xorm:"VARCHAR(64) NOT NULL INDEX UNIQUE(repo_sha_id)"`
3029
TargetURL string `xorm:"TEXT"`
3130
Description string `xorm:"TEXT"`
3231
ContextHash string `xorm:"char(40) index"`

0 commit comments

Comments
 (0)