diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index e8c6b3a383..d17ad583be 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -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), } diff --git a/models/migrations/v1_20/v244.go b/models/migrations/v1_20/v244.go index de60843211..977566ad7d 100644 --- a/models/migrations/v1_20/v244.go +++ b/models/migrations/v1_20/v244.go @@ -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)) -} diff --git a/models/migrations/v1_20/v245.go b/models/migrations/v1_20/v245.go new file mode 100644 index 0000000000..a3cf2149d5 --- /dev/null +++ b/models/migrations/v1_20/v245.go @@ -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)) +}