migration

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 8 Imported by: 0

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