New Show Hacker News story: Show HN: GoSMig – minimal, type-safe SQL migrations written in Go

Show HN: GoSMig – minimal, type-safe SQL migrations written in Go
3 by padurean | 0 comments on Hacker News.
I built GoSMig for my own projects and open-sourced it in case it helps others. It’s a tiny generic library (no external deps except golang.org/x/term) for writing SQL migrations in Go with compile-time checks. It supports transactional and non-transactional migrations, rollback, status, version, and a small CLI handler so you can ship your own migration binary. Why another migrator? - Minimal API, no DSL or file layout to learn - Type-safe via Go generics - Works with database/sql and sqlx out of the box - Should work with any db library (or wrapper) that implements some generic interfaces (see the "Core Types" section here https://ift.tt/Jju4UL8... ) - Tested with PostgreSQL, should work with any SQL RDBMS (MySQL, SQLite, MS SQL Server, ...) Repo: https://ift.tt/jFKZnhI Docs & examples: README + examples branch https://ift.tt/bSKkxIG Would love feedback: ergonomics, missing guardrails, API rough edges, and real-world gotchas, etc.