mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-06 19:08:57 +09:00
ac49dbe1a2
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
26 lines
565 B
Go
26 lines
565 B
Go
// Copyright 2020 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_12
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitea.dev/modelmigration/base"
|
|
)
|
|
|
|
func AddUserRepoMissingColumns(_ context.Context, x base.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))
|
|
}
|