migrator

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2025 License: GPL-3.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 Migrator

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

func New

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

func (*Migrator) CreateNewMigration

func (m *Migrator) CreateNewMigration(name, typ string) error

func (*Migrator) DownAll

func (m *Migrator) DownAll() error

func (*Migrator) DownOne

func (m *Migrator) DownOne() error

func (*Migrator) Up

func (m *Migrator) Up() error

type OptOptionsSetter

type OptOptionsSetter func(o *Options)

type Options

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

func NewOptions

func NewOptions(
	migrationsFs embed.FS,
	migrationsTableName string,
	migrationsDir string,
	db *sql.DB,
	options ...OptOptionsSetter,
) Options

func (*Options) Validate

func (o *Options) Validate() error

Jump to

Keyboard shortcuts

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