1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-19 00:38:36 +00:00

Fix migration v141 (#14387)

* Fix mig 141

* Add Migration to fix it

* update null values to false first

* Alter Table if posible

* use dropTableColumns instead of recreateTable

* MySQL use Alter

* Postgres use Alter

* Update models/migrations/v167.go

* Apply suggestions from code review

* use 2x add col & 2x update & 2x drop col

* let sqlite be the only issue

* use recreate since it just WORKS
This commit is contained in:
6543
2021-01-28 23:58:33 +01:00
committed by GitHub
parent 3599d44399
commit 2ebe609d65
3 changed files with 109 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ import (
func addKeepActivityPrivateUserColumn(x *xorm.Engine) error {
type User struct {
KeepActivityPrivate bool
KeepActivityPrivate bool `xorm:"NOT NULL DEFAULT false"`
}
if err := x.Sync2(new(User)); err != nil {