diff options
Diffstat (limited to 'models/migrations')
-rw-r--r-- | models/migrations/migrations.go | 2 | ||||
-rw-r--r-- | models/migrations/v138.go | 22 |
2 files changed, 24 insertions, 0 deletions
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index fe72d0f630..6868aad7b1 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -208,6 +208,8 @@ var migrations = []Migration{ NewMigration("Add CommitsAhead and CommitsBehind Column to PullRequest Table", addCommitDivergenceToPulls), // v137 -> v138 NewMigration("Add Branch Protection Block Outdated Branch", addBlockOnOutdatedBranch), + // v138 -> v139 + NewMigration("Add ResolveDoerID to Comment table", addResolveDoerIDCommentColumn), } // GetCurrentDBVersion returns the current db version diff --git a/models/migrations/v138.go b/models/migrations/v138.go new file mode 100644 index 0000000000..2db9b821ad --- /dev/null +++ b/models/migrations/v138.go @@ -0,0 +1,22 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "fmt" + + "xorm.io/xorm" +) + +func addResolveDoerIDCommentColumn(x *xorm.Engine) error { + type Comment struct { + ResolveDoerID int64 + } + + if err := x.Sync2(new(Comment)); err != nil { + return fmt.Errorf("Sync2: %v", err) + } + return nil +} |