migration

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntStrategy

type EntStrategy struct {
	// contains filtered or unexported fields
}

EntStrategy adapts an ent migration function to Strategy.

func NewEntStrategy

func NewEntStrategy(migrateFn func(context.Context) error) *EntStrategy

func (*EntStrategy) Migrate

func (s *EntStrategy) Migrate(ctx context.Context) error

func (*EntStrategy) Name

func (s *EntStrategy) Name() string

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager orchestrates migration execution.

func NewManager

func NewManager(strategy Strategy) *Manager

func (*Manager) Run

func (m *Manager) Run(ctx context.Context) error

type Strategy

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

Strategy defines a pluggable migration execution strategy.

Jump to

Keyboard shortcuts

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