migrations

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunMigrations

func RunMigrations(migrations Migrations) error

Types

type Logger

type Logger interface {
	Fatalf(format string, v ...any)
	Printf(format string, v ...any)
}

Logger defines the interface for a logger that can be used by the goose migration tool.

func NopLogger

func NopLogger() Logger

type Migrations

type Migrations struct {
	DB      *sql.DB
	Fsys    fs.FS
	Logger  Logger
	Dialect string
	Dir     string
}

type Options

type Options struct {
	// SkipMigrations prevents the store from automatically running database migrations on startup.
	// This is useful in environments where migrations are handled by a separate process.
	SkipMigrations bool
	// Logger is the logger instance goose will use. It defaults to a no-op logger.
	Logger Logger
}

Options provides configuration for the database migration process.

Jump to

Keyboard shortcuts

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