migration

package
v0.0.0-...-fc1d3c0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Provide(New)

Module exposes the migrator via Fx.

Functions

This section is empty.

Types

type Migrator

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

Migrator wraps goose operations.

func New

func New(cfg config.Config, conns *database.Connections, logger *zap.Logger) (*Migrator, error)

New constructs a goose-backed migrator.

func (*Migrator) Down

func (m *Migrator) Down(ctx context.Context, steps int, all bool) error

Down rolls back migrations. Steps <=0 defaults to 1; all=true rolls everything back.

func (*Migrator) Up

func (m *Migrator) Up(ctx context.Context) error

Up applies all pending migrations.

Jump to

Keyboard shortcuts

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