code.gitea.io/gitea@v1.21.7/models/migrations/v1_12/v121.go (about)

     1  // Copyright 2020 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package v1_12 //nolint
     5  
     6  import "xorm.io/xorm"
     7  
     8  func AddIsRestricted(x *xorm.Engine) error {
     9  	// User see models/user.go
    10  	type User struct {
    11  		ID           int64 `xorm:"pk autoincr"`
    12  		IsRestricted bool  `xorm:"NOT NULL DEFAULT false"`
    13  	}
    14  
    15  	return x.Sync(new(User))
    16  }