migrate

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter implements runtime.Migrator using migrator.Runner.

func New

func New(opts Options) (*Adapter, error)

New builds an Adapter and pings the database.

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