code.gitea.io/gitea@v1.21.7/models/migrations/v1_12/v124.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 ( 7 "xorm.io/xorm" 8 ) 9 10 func AddUserRepoMissingColumns(x *xorm.Engine) error { 11 type VisibleType int 12 type User struct { 13 PasswdHashAlgo string `xorm:"NOT NULL DEFAULT 'pbkdf2'"` 14 Visibility VisibleType `xorm:"NOT NULL DEFAULT 0"` 15 } 16 17 type Repository struct { 18 IsArchived bool `xorm:"INDEX"` 19 Topics []string `xorm:"TEXT JSON"` 20 } 21 22 return x.Sync(new(User), new(Repository)) 23 }