mirror of
https://github.com/hanzozt/zt.git
synced 2026-10-30 15:04:55 +00:00
Global rebrand of all OpenZiti references to Hanzo ZT: - Go module paths: github.com/openziti/* → github.com/hanzozt/* - Docker images: openziti/* → hanzozt/* - Java packages: org.openziti.* → org.hanzozt.* - Brand: OpenZiti → Hanzo ZT - URLs: openziti.io → hanzozt.dev
25 lines
807 B
Go
25 lines
807 B
Go
package db
|
|
|
|
import (
|
|
"github.com/hanzozt/storage/boltz"
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func (m *Migrations) createInterceptV1ConfigType(step *boltz.MigrationStep) {
|
|
cfg, _ := m.stores.ConfigType.LoadOneByName(step.Ctx.Tx(), interceptV1ConfigType.Name)
|
|
if cfg == nil {
|
|
step.SetError(m.stores.ConfigType.Create(step.Ctx, interceptV1ConfigType))
|
|
} else {
|
|
log.Debugf("'%s' config type already exists. not creating.", interceptV1ConfigType.Name)
|
|
}
|
|
}
|
|
|
|
func (m *Migrations) createHostV1ConfigType(step *boltz.MigrationStep) {
|
|
cfg, _ := m.stores.ConfigType.LoadOneByName(step.Ctx.Tx(), hostV1ConfigType.Name)
|
|
if cfg == nil {
|
|
step.SetError(m.stores.ConfigType.Create(step.Ctx, hostV1ConfigType))
|
|
} else {
|
|
log.Debugf("'%s' config type already exists. not creating.", hostV1ConfigType.Name)
|
|
}
|
|
}
|