Skip to content

Commit 6a7130c

Browse files
committed
let sqlite be the only issue
1 parent 74510e6 commit 6a7130c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

models/migrations/v167.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ func recreateUserTableToFixDefaultValues(x *xorm.Engine) error {
3333
}
3434
_, err := x.Exec("ALTER TABLE `user` ALTER COLUMN keep_activity_private SET DEFAULT false;")
3535
return err
36+
case schemas.MSSQL:
37+
if _, err := x.Exec("ALTER TABLE `user` ADD DEFAULT 0 FOR keep_activity_private GO;"); err != nil {
38+
return err
39+
}
40+
_, err := x.Exec("ALTER TABLE `user` ALTER COLUMN keep_activity_private bit NOT NULL GO;")
41+
return err
3642
}
3743

3844
sess := x.NewSession()

0 commit comments

Comments
 (0)