migrate

package
v0.0.0-...-5bc5eca Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(p Plugin)

Register adds a migration plugin. Called from init() in plugin packages.

func RunAll

func RunAll(ctx context.Context) error

RunAll executes all registered migrators sorted by Order.

Types

type Migrator

type Migrator interface {
	Name() string
	Migrate(ctx context.Context) error
}

Migrator runs schema migrations for a single plugin.

type Plugin

type Plugin struct {
	Order    int
	Migrator Migrator
}

Plugin represents a migrator with an order for deterministic execution sequence.

Jump to

Keyboard shortcuts

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