migrations

package
v0.0.0-...-ff134b0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package migrations is for database migrations! This is not related to the `opactl migrate` command at all.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrations

func Migrations(dialect string) (fs.FS, error)

func Var

func Var(fs *pflag.FlagSet, yes *bool)

Types

type Migrator

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

func New

func New() *Migrator

func (*Migrator) Run

func (m *Migrator) Run(ctx context.Context) (*database.Database, error)

func (*Migrator) WithConfig

func (m *Migrator) WithConfig(db *config.Database) *Migrator

func (*Migrator) WithLogger

func (m *Migrator) WithLogger(log *logging.Logger) *Migrator

func (*Migrator) WithMigrate

func (m *Migrator) WithMigrate(yes bool) *Migrator

WithMigrate causes migrations to be applied. Without this, we will log (INFO) the number of pending migrations only.

Jump to

Keyboard shortcuts

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