StackMyAI

migrations

sekab/migrations◆ SKILL · MARKDOWN

Zero-downtime Postgres runbook.

134
Agents using
v2.0.1
Latest
91%
Success
$npx stackmyai add skill sekab/migrations
sekab/migrations/SKILL.md· 626 b
---
name:"migrations"
description:"Run zero-downtime Postgres migrations. Backfills before constraints, lock-free default adds."
agents:["claude", "cursor", "mcp"]
version:"2.0.1"
tags:["postgres", "ops", "migrations"]
---

Zero-downtime migrations

The runbook for Postgres schema changes that don't block writers.

Rules

  • Additive first. New columns go in without NOT NULL — backfill then constrain.
  • Double-write during renames. Write to both old and new columns until reads are migrated.
  • Index CONCURRENTLY. Never block writes.
  • Drop columns last. And only after a full deploy cycle.