migrate

package
v1.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts Options) (ports.Migrator, error)

New builds an Adapter and pings the database.

Types

type Adapter

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

Adapter implements runtime.Migrator using migrator.Runner.

func (*Adapter) Close

func (a *Adapter) Close() error

func (*Adapter) Down

func (a *Adapter) Down(ctx context.Context, dir string) error

func (*Adapter) Status

func (a *Adapter) Status(ctx context.Context, dir string) (string, error)

func (*Adapter) Up

func (a *Adapter) Up(ctx context.Context, dir string) error

type Options

type Options struct {
	DSN                string
	Dirs               []string // optional; multiple directories
	Table              string
	LockKey            int64
	AllowDangerousDown bool
	EmbeddedFSs        []fs.FS // optional; multiple embedded FS
	Log                ports.Logger
}

Jump to

Keyboard shortcuts

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