This commit is contained in:
stuzer05 2023-02-24 23:33:27 +02:00
parent 875087061f
commit 29dd61722b
3 changed files with 27 additions and 17 deletions

View File

@ -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),
}

View File

@ -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))
}

View File

@ -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))
}