mirror of https://github.com/go-gitea/gitea
Commit
This commit is contained in:
parent
875087061f
commit
29dd61722b
|
@ -467,6 +467,8 @@ var migrations = []Migration{
|
|||
|
||||
// v244 -> v245
|
||||
NewMigration("Add NeedApproval to actions tables", v1_20.AddNeedApprovalToActionRun),
|
||||
|
||||
// v245 -> v246
|
||||
NewMigration("Add TimeEstimate to issue table", v1_20.AddTimeEstimateColumnToIssueTable),
|
||||
NewMigration("Add TimeTracked, TimeEstimate to comment table", v1_20.AddColumnsToCommentTable),
|
||||
}
|
||||
|
|
|
@ -20,20 +20,3 @@ func AddNeedApprovalToActionRun(x *xorm.Engine) error {
|
|||
|
||||
return x.Sync(new(ActionRun))
|
||||
}
|
||||
|
||||
func AddTimeEstimateColumnToIssueTable(x *xorm.Engine) error {
|
||||
type Issue struct {
|
||||
TimeEstimate int64
|
||||
}
|
||||
|
||||
return x.Sync(new(Issue))
|
||||
}
|
||||
|
||||
func AddColumnsToCommentTable(x *xorm.Engine) error {
|
||||
type Comment struct {
|
||||
TimeTracked int64
|
||||
TimeEstimate int64
|
||||
}
|
||||
|
||||
return x.Sync(new(Comment))
|
||||
}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2023 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package v1_20 //nolint
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func AddTimeEstimateColumnToIssueTable(x *xorm.Engine) error {
|
||||
type Issue struct {
|
||||
TimeEstimate int64
|
||||
}
|
||||
|
||||
return x.Sync(new(Issue))
|
||||
}
|
||||
|
||||
func AddColumnsToCommentTable(x *xorm.Engine) error {
|
||||
type Comment struct {
|
||||
TimeTracked int64
|
||||
TimeEstimate int64
|
||||
}
|
||||
|
||||
return x.Sync(new(Comment))
|
||||
}
|
Loading…
Reference in New Issue