27 lines
657 B
Go
27 lines
657 B
Go
|
// Copyright 2024 The Forgejo Authors
|
||
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||
|
|
||
|
package v1_22 //nolint
|
||
|
|
||
|
import (
|
||
|
"code.gitea.io/gitea/models/federation"
|
||
|
"code.gitea.io/gitea/modules/log"
|
||
|
"xorm.io/xorm"
|
||
|
)
|
||
|
|
||
|
//// HookTask represents a hook task.
|
||
|
//// exact copy of models/webhook/hooktask.go when this migration was created
|
||
|
//// - xorm:"-" fields deleted
|
||
|
//type FederatedHost struct {
|
||
|
// ID int64 `xorm:"pk autoincr"`
|
||
|
// isBlocked bool
|
||
|
// HostFqdn string `xorm:"UNIQUE(s) INDEX"`
|
||
|
//}
|
||
|
|
||
|
func AddFederatedHost(x *xorm.Engine) error {
|
||
|
|
||
|
// panic("add host")
|
||
|
log.Info("Running Add host migration")
|
||
|
return x.Sync(new(federation.FederatedHost))
|
||
|
}
|