File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import (
1212
1313func addKeepActivityPrivateUserColumn (x * xorm.Engine ) error {
1414 type User struct {
15- KeepActivityPrivate bool
15+ KeepActivityPrivate bool `xorm:"NOT NULL DEFAULT false"`
1616 }
1717
1818 if err := x .Sync2 (new (User )); err != nil {
Original file line number Diff line number Diff line change @@ -15,12 +15,14 @@ import (
1515
1616 "code.gitea.io/gitea/modules/setting"
1717
18- // Needed for the MySQL driver
19- _ "github.com/go-sql-driver/mysql"
18+ "xorm.io/builder"
2019 "xorm.io/xorm"
2120 "xorm.io/xorm/names"
2221 "xorm.io/xorm/schemas"
2322
23+ // Needed for the MySQL driver
24+ _ "github.com/go-sql-driver/mysql"
25+
2426 // Needed for the Postgresql driver
2527 _ "github.com/lib/pq"
2628
@@ -312,6 +314,13 @@ func DumpDatabase(filePath string, dbType string) error {
312314 tbs = append (tbs , t )
313315 }
314316
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+
315324 type Version struct {
316325 ID int64 `xorm:"pk autoincr"`
317326 Version int64
You can’t perform that action at this time.
0 commit comments