code.gitea.io/gitea@v1.21.7/models/migrations/v1_13/v141.go (about) 1 // Copyright 2020 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package v1_13 //nolint 5 6 import ( 7 "fmt" 8 9 "xorm.io/xorm" 10 ) 11 12 func AddKeepActivityPrivateUserColumn(x *xorm.Engine) error { 13 type User struct { 14 KeepActivityPrivate bool `xorm:"NOT NULL DEFAULT false"` 15 } 16 17 if err := x.Sync(new(User)); err != nil { 18 return fmt.Errorf("Sync: %w", err) 19 } 20 return nil 21 }