first-commit
This commit is contained in:
23
models/migrations/v1_12/v124.go
Normal file
23
models/migrations/v1_12/v124.go
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright 2020 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package v1_12
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func AddUserRepoMissingColumns(x *xorm.Engine) error {
|
||||
type VisibleType int
|
||||
type User struct {
|
||||
PasswdHashAlgo string `xorm:"NOT NULL DEFAULT 'pbkdf2'"`
|
||||
Visibility VisibleType `xorm:"NOT NULL DEFAULT 0"`
|
||||
}
|
||||
|
||||
type Repository struct {
|
||||
IsArchived bool `xorm:"INDEX"`
|
||||
Topics []string `xorm:"TEXT JSON"`
|
||||
}
|
||||
|
||||
return x.Sync(new(User), new(Repository))
|
||||
}
|
Reference in New Issue
Block a user