golangmigrate

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package golangmigrate provides a MigrationDriver backed by golang-migrate/migrate/v4.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct{}

Driver implements interfaces.MigrationDriver using golang-migrate.

func New

func New() *Driver

New returns a new golang-migrate Driver.

func (*Driver) Down

Down rolls back N migrations (Options.Steps, default 1).

func (*Driver) Force added in v0.3.2

Force sets the recorded migration version without applying migration files.

func (*Driver) Goto

Goto migrates to the specified version (up or down).

func (*Driver) Name

func (d *Driver) Name() string

Name returns the driver name.

func (*Driver) Status

Status returns the current migration version and pending migrations.

func (*Driver) Up

Up applies all pending migrations.

type ForceOptions added in v0.3.2

type ForceOptions struct {
	// AllowClean permits force-setting a database that is not currently dirty.
	// Leave false for normal repair flows so force is limited to dirty states.
	AllowClean bool
}

ForceOptions controls safety checks for metadata-only force repair.

Jump to

Keyboard shortcuts

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