migrate

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TableName_Users    = "users"
	TableName_Networks = "networks"
	TableName_Hosts    = "hosts"
)
View Source
const (
	TableName_PendingUsers = "pending_users"
	TableName_UserInvites  = "user_invites"
	TableName_Nodes        = "nodes"
	TableName_Acls         = "acls"
)
View Source
const (
	TableName_ServerConf     = "serverconf"
	TableName_Generated      = "generated"
	TableName_ServerUUID     = "serveruuid"
	TableName_EnrollmentKey  = "enrollmentkeys"
	TableName_ServerSettings = "server_settings"
)
View Source
const (
	LegacyServerSettingsKey = "server_cfg"
)

Variables

View Source
var ErrMigrationV160Required = errors.New(
	"migration-v1.6.0 must complete on Netmaker v1.6.0 before upgrading to v1.7.0; " +
		"deploy v1.6.0, restart the server successfully, then upgrade to v1.7.0",
)

ErrMigrationV160Required is returned when v1.7.0 migration is attempted before migration-v1.6.0 completed on a prior v1.6.0 deployment.

View Source
var SyncOrgAndTenants = CreateLocalDefaults

Functions

func CreateLocalDefaults added in v1.7.0

func CreateLocalDefaults(ctx context.Context) error

func EnsureLocalOrganization added in v1.7.0

func EnsureLocalOrganization(ctx context.Context) (*schema.Organization, error)

func EnsureLocalTenant added in v1.7.0

func EnsureLocalTenant(ctx context.Context, orgID string) (*schema.Tenant, error)

func MigrateEmqx added in v0.24.0

func MigrateEmqx()

func RekeyOrganization added in v1.7.0

func RekeyOrganization(ctx context.Context, oldID, newID string) error

func RekeyTenant added in v1.7.0

func RekeyTenant(ctx context.Context, oldID, newID string) error

func Run

func Run()

Run - runs all migrations

func ToSQLSchema added in v0.99.0

func ToSQLSchema() error

Types

type KVRecord added in v1.6.0

type KVRecord struct {
	Key   string `gorm:"column:key;primaryKey"`
	Value string `gorm:"column:value"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL