We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d43a529 commit 76cbc60Copy full SHA for 76cbc60
models/migrations/v167.go
@@ -7,9 +7,16 @@ package migrations
7
import (
8
"xorm.io/builder"
9
"xorm.io/xorm"
10
+ "xorm.io/xorm/schemas"
11
)
12
13
func recreateUserTableToFixDefaultValues(x *xorm.Engine) error {
14
+ switch x.Dialect().URI().DBType {
15
+ case schemas.MYSQL:
16
+ _, err := x.Exec("ALTER TABLE `user` MODIFY COLUMN keep_activity_private tinyint(1) DEFAULT 0 NOT NULL;")
17
+ return err
18
+ }
19
+
20
type User struct {
21
ID int64 `xorm:"pk autoincr"`
22
KeepActivityPrivate bool `xorm:"NOT NULL DEFAULT false"`
0 commit comments