Hasty Briefsbeta

Show HN: GoSMig – minimal, type-safe SQL migrations written in Go

17 hours ago
  • #SQL
  • #Go
  • #Migrations
  • GoSMig is a simple, minimal SQL migration tool written in Go.
  • Supports both database/sql and sqlx out of the box.
  • Database agnostic, works with any database implementing Go's standard database/sql interfaces.
  • Features type safety with Go generics, flexible migration options (transactional and non-transactional), and robust error handling.
  • Includes CLI-ready functionality, though no actual CLI is provided; users can build their own.
  • Supports rollback, status tracking with paging, and configurable operation timeouts.
  • Zero dependencies except for the Go standard library and golang.org/x/term for pager support.
  • Examples provided for both database/sql and sqlx usage.
  • Includes comprehensive test suite and PostgreSQL integration tests.
  • Released into the public domain under the Unlicense.