fix: make run index group by repo id only

This commit is contained in:
Jason Song
2022-10-20 11:53:34 +08:00
parent a5a112425b
commit a8f74d4ec8
2 changed files with 7 additions and 16 deletions

View File

@ -51,9 +51,9 @@ func addBotTables(x *xorm.Engine) error {
type BotsRun struct {
ID int64
Title string
RepoID int64 `xorm:"index unique(repo_workflow_index)"`
WorkflowID string `xorm:"index unique(repo_workflow_index)"` // the name of workflow file
Index int64 `xorm:"index unique(repo_workflow_index)"` // a unique number for each run of a particular workflow in a repository
RepoID int64 `xorm:"index unique(repo_index)"`
WorkflowID string `xorm:"index"` // the name of workflow file
Index int64 `xorm:"index unique(repo_index)"` // a unique number for each run of a repository
TriggerUserID int64
Ref string
CommitSHA string