Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion models/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
// ResourceIndex represents a resource index which could be used as issue/release and others
// We can create different tables i.e. issue_index, release_index and etc.
type ResourceIndex struct {
GroupID int64 `xorm:"unique"`
GroupID int64 `xorm:"pk"`
MaxIndex int64 `xorm:"index"`
}

Expand Down
4 changes: 2 additions & 2 deletions models/migrations/v182.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

func addIssueResourceIndexTable(x *xorm.Engine) error {
type ResourceIndex struct {
GroupID int64 `xorm:"index unique(s)"`
MaxIndex int64 `xorm:"index unique(s)"`
GroupID int64 `xorm:"pk"`
MaxIndex int64 `xorm:"index"`
}

sess := x.NewSession()
Expand Down
4 changes: 2 additions & 2 deletions models/migrations/v182_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ func Test_addIssueResourceIndexTable(t *testing.T) {
}

type ResourceIndex struct {
GroupID int64 `xorm:"index unique(s)"`
MaxIndex int64 `xorm:"index unique(s)"`
GroupID int64 `xorm:"pk"`
MaxIndex int64 `xorm:"index"`
}

var start = 0
Expand Down