db-migrate
Installation
SKILL.md
Database Migrations (golang-migrate)
Overview
Safe, reversible PostgreSQL schema changes using golang-migrate. Every migration must be idempotent and have a working rollback.
Core principle: Every up.sql must have a working down.sql. Verify with up → down → up cycle.
When to Use
- Adding tables, columns, indexes, or constraints
- Modifying existing schema
- Creating enum types
- Adding seed data via migrations