removed unnecessary index in xorm declaration

This commit is contained in:
kolaente 2018-06-06 14:40:14 +02:00
parent 39392de1f5
commit 87f41c0dc0
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
2 changed files with 3 additions and 4 deletions

View File

@ -107,9 +107,8 @@ func RemoveIssueDependency(user *User, issue *Issue, dep *Issue, depType Depende
}
// Check if the dependency already exists
func issueDepExists(e Engine, issueID int64, depID int64) (exists bool, err error) {
exists, err = e.Where("(issue_id = ? AND dependency_id = ?)", issueID, depID).Exist(&IssueDependency{})
return
func issueDepExists(e Engine, issueID int64, depID int64) (bool, error) {
return e.Where("(issue_id = ? AND dependency_id = ?)", issueID, depID).Exist(&IssueDependency{})
}
// IssueNoDependenciesLeft checks if issue can be closed

View File

@ -21,7 +21,7 @@ func addIssueDependencies(x *xorm.Engine) (err error) {
IssueID int64 `xorm:"NOT NULL"`
DependencyID int64 `xorm:"NOT NULL"`
Created time.Time `xorm:"-"`
CreatedUnix int64 `xorm:"INDEX created"`
CreatedUnix int64 `xorm:"created"`
Updated time.Time `xorm:"-"`
UpdatedUnix int64 `xorm:"updated"`
}