migration

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

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

Runner wraps goose for migration operations

func New

func New() (*Runner, error)

New creates a new migration runner It auto-detects the database path and migrations directory

func (*Runner) Close

func (r *Runner) Close() error

Close closes the database connection

func (*Runner) Create

func (r *Runner) Create(name string) error

Create generates a new migration file with the given name

func (*Runner) Down

func (r *Runner) Down() error

Down rolls back the most recent migration and regenerates sqlc code

func (*Runner) Status

func (r *Runner) Status() error

Status shows the status of all migrations

func (*Runner) Up

func (r *Runner) Up() error

Up runs all pending migrations and regenerates sqlc code

Jump to

Keyboard shortcuts

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