migrations

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package migrations provides a lightweight, dependency-free migration runner. Migrations are embedded SQL files named NNN_description.{up,down}.sql. Applied migrations are tracked in the schema_migrations table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateDown

func MigrateDown(ctx context.Context, db *sql.DB) error

MigrateDown rolls back the most recently applied migration.

func MigrateUp

func MigrateUp(ctx context.Context, db *sql.DB) error

MigrateUp applies all pending up-migrations in version order.

func Reset

func Reset(ctx context.Context, db *sql.DB) error

Reset rolls back all applied migrations in reverse order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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