code.gitea.io/gitea@v1.21.7/models/migrations/v1_7/v73.go (about) 1 // Copyright 2018 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package v1_7 //nolint 5 6 import ( 7 "xorm.io/xorm" 8 ) 9 10 func AddMustChangePassword(x *xorm.Engine) error { 11 // User see models/user.go 12 type User struct { 13 ID int64 `xorm:"pk autoincr"` 14 MustChangePassword bool `xorm:"NOT NULL DEFAULT false"` 15 } 16 17 return x.Sync(new(User)) 18 }