migration

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateDb

func MigrateDb() error

MigrateDb applies the one-off data repairs older releases left pending and stamps the database with the running version. Callers must run it before the panel opens the database: the repairs below assume the pre-AutoMigrate schema, exactly as `sui migrate` has always seen it.

It reports failures instead of killing the process, because the panel now calls it on every start-up: a data repair that cannot be applied must not keep the panel from booting. Panics become errors for the same reason — the gates below parse whatever version string the database happens to hold. Progress goes to stdout because `sui migrate` is a CLI command whose entire output this is.

func MigrateDbQuietly added in v1.7.2

func MigrateDbQuietly() error

MigrateDbQuietly is MigrateDb with the progress lines discarded. The panel calls it on every start-up, where the answer is almost always "already up to date"; printing that would add three lines of untimestamped, unlevelled text to stdout on every restart, on a channel SUI_LOG_LEVEL cannot turn down. Discarded rather than routed to logger: only app.Init initialises logger, so the same call from `sui migrate` would dereference a nil handle.

Types

type InboundData

type InboundData struct {
	Id      uint
	Tag     string
	Addrs   json.RawMessage
	OutJson json.RawMessage
}

Jump to

Keyboard shortcuts

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