AJ ONeal 818871ed76
feat(mymigrate/examples): add minimal migration runner example
Demonstrates mymigrate with embedded SQL migrations: up, down, status,
and reset commands. Two migrations (init + create-todos) show the
minimum viable pattern for using sqlmigrate with MySQL/MariaDB.

Verified against MariaDB 11.4.9 via sclient --alpn mysql.
2026-04-08 22:02:58 -06:00
..

sqlmigrate

Database-agnostic SQL migration library for Go.

Go Reference

Backend packages

Each backend is a separate Go module to avoid pulling unnecessary drivers:

Package Database Driver
pgmigrate PostgreSQL pgx/v5
mymigrate MySQL / MariaDB go-sql-driver/mysql
litemigrate SQLite database/sql (caller imports driver)
msmigrate SQL Server go-mssqldb
shmigrate Shell scripts (uses native CLI)

CLI

The sql-migrate CLI uses shmigrate to generate shell scripts for managing migrations without a Go dependency at runtime.