File tree 2 files changed +12
-3
lines changed 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import (
12
12
13
13
func addKeepActivityPrivateUserColumn (x * xorm.Engine ) error {
14
14
type User struct {
15
- KeepActivityPrivate bool
15
+ KeepActivityPrivate bool `xorm:"NOT NULL DEFAULT false"`
16
16
}
17
17
18
18
if err := x .Sync2 (new (User )); err != nil {
Original file line number Diff line number Diff line change @@ -15,12 +15,14 @@ import (
15
15
16
16
"code.gitea.io/gitea/modules/setting"
17
17
18
- // Needed for the MySQL driver
19
- _ "github.com/go-sql-driver/mysql"
18
+ "xorm.io/builder"
20
19
"xorm.io/xorm"
21
20
"xorm.io/xorm/names"
22
21
"xorm.io/xorm/schemas"
23
22
23
+ // Needed for the MySQL driver
24
+ _ "github.com/go-sql-driver/mysql"
25
+
24
26
// Needed for the Postgresql driver
25
27
_ "github.com/lib/pq"
26
28
@@ -312,6 +314,13 @@ func DumpDatabase(filePath string, dbType string) error {
312
314
tbs = append (tbs , t )
313
315
}
314
316
317
+ // temporary fix for v1.13.x (https://github.com/go-gitea/gitea/issues/14069)
318
+ if _ , err := x .Where (builder.IsNull {"keep_activity_private" }).
319
+ Cols ("keep_activity_private" ).
320
+ Update (User {KeepActivityPrivate : false }); err != nil {
321
+ return err
322
+ }
323
+
315
324
type Version struct {
316
325
ID int64 `xorm:"pk autoincr"`
317
326
Version int64
You can’t perform that action at this time.
0 commit comments