migration

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package migration provides a runner for goose SQL migrations using an embedded filesystem as the migration source.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Down

func Down(db *sql.DB, fsys fs.FS, dir string) error

Down rolls back all applied migrations.

func Run

func Run(db *sql.DB, fsys fs.FS, dir string) error

Run runs all pending up migrations from the given filesystem and directory. The dir parameter is the path within fsys containing the SQL files (e.g., "migrations" for an embed.FS rooted at the module). It is safe to call multiple times; already-applied migrations are skipped.

Types

This section is empty.

Jump to

Keyboard shortcuts

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