GoSMig – minimal, type-safe SQL migrations written in Go
GoSMig – minimal, type-safe SQL migrations written in Go
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://github.com/padurean/gosmig?tab=readme-ov-file#core-t... ) - Tested with PostgreSQL, should work with any SQL RDBMS (MySQL, SQLite, MS SQL Server, ...) Repo: https://github.com/padurean/gosmig Docs & examples: README + examples branch https://github.com/padurean/gosmig/tree/examples Would love feedback: ergonomics, missing guardrails, API rough edges, and real-world gotchas, etc.
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
A Compiler from SQL to NoSQL Written in PureScript
Bun-sqlgen – Type-safe raw SQL for Bun, no ORM
Plisqin, an SQL generator written in Racket
sqlc – Compile SQL Queries to Type-Safe Go
Native SQL, type-safe, in-lined. Pick three
Type Safe SQL Query Builder
I made type-safe Firestore ORM and call it Typesaurus
C8x type safe K8s deployments
Newzly-phantom – Asynchronous type-safe Scala DSL for Cassandra
Generate type-safe code for SQL queries in any language