GoSMig: minimal, type-safe SQL migrations written in Go with generics (zero deps, database/sql and sqlx supported OOTB)

I built GoSMig for my own projects and open-sourced it. Highlights:

  • Go generics for compile-time safety

  • Transactional and non-transactional migrations

  • Rollback, status (paging), version

  • database/sql and sqlx supported out of the box, others would work too (some interfaces must be satisfied)

  • Zero external deps (aside from x/term for pager)

Repo: GitHub - padurean/gosmig: Simple, minimal SQL database migrations written in Go. Build your own migration CLI with it. Std lib database/sql and SQLX supported out of the box.

Examples: GitHub - padurean/gosmig at examples

Would love to hear what’s missing to make this production-friendly.