summaryrefslogtreecommitdiffstats
path: root/models/migrations/v1_13/v141.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--models/migrations/v1_13/v141.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/models/migrations/v1_13/v141.go b/models/migrations/v1_13/v141.go
new file mode 100644
index 0000000..ae211e0
--- /dev/null
+++ b/models/migrations/v1_13/v141.go
@@ -0,0 +1,21 @@
+// Copyright 2020 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package v1_13 //nolint
+
+import (
+ "fmt"
+
+ "xorm.io/xorm"
+)
+
+func AddKeepActivityPrivateUserColumn(x *xorm.Engine) error {
+ type User struct {
+ KeepActivityPrivate bool `xorm:"NOT NULL DEFAULT false"`
+ }
+
+ if err := x.Sync(new(User)); err != nil {
+ return fmt.Errorf("Sync: %w", err)
+ }
+ return nil
+}