summaryrefslogtreecommitdiffstats
path: root/models/migrations/v1_12/v125.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--models/migrations/v1_12/v125.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/models/migrations/v1_12/v125.go b/models/migrations/v1_12/v125.go
new file mode 100644
index 0000000..ec4ffaa
--- /dev/null
+++ b/models/migrations/v1_12/v125.go
@@ -0,0 +1,22 @@
+// Copyright 2020 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package v1_12 //nolint
+
+import (
+ "fmt"
+
+ "xorm.io/xorm"
+)
+
+func AddReviewMigrateInfo(x *xorm.Engine) error {
+ type Review struct {
+ OriginalAuthor string
+ OriginalAuthorID int64
+ }
+
+ if err := x.Sync(new(Review)); err != nil {
+ return fmt.Errorf("Sync: %w", err)
+ }
+ return nil
+}