go-migration

Manage PostgreSQL schema migrations for Go services using goose conventions.

1|Updated Jun 20, 2026
One-click install
npx skills add https://github.com/shafibabar/SDLC-Artifact-Factory --skill go-migration-shafibabar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-migration
Source: https://github.com/shafibabar/SDLC-Artifact-Factory/tree/main/skills/go-migration
Command: npx skills add https://github.com/shafibabar/SDLC-Artifact-Factory --skill go-migration-shafibabar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill eliminates the risk of production outages caused by schema changes by enforcing a rigorous, versioned, and reversible migration standard that decouples database updates from application deployments.

Core Features & Use Cases

  • Zero-Downtime Patterns: Implements expand/contract strategies to ensure database changes never break currently running application versions.
  • Safety Guardrails: Enforces sequential file naming, mandatory CI-tested reversibility, and concurrent index creation to prevent production locking.
  • Use Case: When adding a required column to a high-traffic table, use this skill to safely perform the migration in two phases—adding the column as nullable, backfilling data via a batch job, and finally applying the constraint—without ever blocking live writes.

Quick Start

Use the go-migration skill to generate a new sequential migration file for adding a column to the users table following the expand-contract pattern.

Frequently Asked Questions about go-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform zero-downtime PostgreSQL schema migrations in a Go service?

Zero-downtime PostgreSQL schema migrations in Go services are managed using the goose tool convention to ensure reproducibility, backward compatibility, and robust reversibility without interrupting live traffic.

What is the expand-contract pattern for adding a required column to a high-traffic PostgreSQL table?

The expand-contract pattern for adding a required column involves adding the column as nullable, backfilling data via a batch job, and finally applying the constraint to prevent blocking live database writes.

How do I prevent database locking when creating indexes on production PostgreSQL tables?

Preventing database locking during PostgreSQL index creation requires enforcing concurrent index builds, which allows the migration to proceed safely without blocking live read or write operations.

Does the goose migration convention support decoupled deployment pipelines for Go backends?

The goose migration convention supports decoupled migration-deployment pipelines for Go backends by enforcing sequential immutable versioning and mandatory CI-tested reversibility independent of application releases.

What are the safety guardrails for sequential database schema versioning?

Safety guardrails for sequential database schema versioning include enforcing sequential file naming, requiring CI-tested reversibility for every migration, and mandating concurrent index creation to avoid production locking.

When should I use a reversible migration strategy for backend database changes?

A reversible migration strategy for backend database changes is necessary when applying schema evolution to high-traffic PostgreSQL tables where backward compatibility and immediate rollback capability are required to avoid production outages.