migration

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: GPL-3.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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