mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-01 13:01:15 +00:00
23 lines
454 B
Go
23 lines
454 B
Go
|
// Copyright 2024 The Forgejo Authors c/o Codeberg e.V.. All rights reserved.
|
||
|
// SPDX-License-Identifier: MIT
|
||
|
|
||
|
package v1_22 //nolint
|
||
|
|
||
|
import (
|
||
|
"xorm.io/xorm"
|
||
|
)
|
||
|
|
||
|
type RepoFlag struct {
|
||
|
ID int64 `xorm:"pk autoincr"`
|
||
|
RepoID int64 `xorm:"UNIQUE(s) INDEX"`
|
||
|
Name string `xorm:"UNIQUE(s) INDEX"`
|
||
|
}
|
||
|
|
||
|
func (RepoFlag) TableName() string {
|
||
|
return "forgejo_repo_flag"
|
||
|
}
|
||
|
|
||
|
func CreateRepoFlagTable(x *xorm.Engine) error {
|
||
|
return x.Sync(new(RepoFlag))
|
||
|
}
|