0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-24 12:43:08 +02:00
Copilot 94e3482d1a
chore(db): introduce db.Session and db.EngineMigration interfaces (#37746)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-18 03:56:39 +08:00

22 lines
527 B
Go

// Copyright 2020 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package v1_12
import "code.gitea.io/gitea/models/db"
func AddUserRepoMissingColumns(x db.EngineMigration) 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))
}