⚡AgentSkills
⚙️ Backend Engineering · Databases

Run zero-downtime schema migrations

Expand-contract deployments so schema changes ship without locking tables or breaking running code.

advanced~40 minBackend EngineersAPI DevelopersPlatform Engineers

Steps

  1. 1Expand: add nullable columns/tables first; deploy code writing both paths
  2. 2Backfill in batches with sleep/throttling; monitor replication lag
  3. 3Switch reads to the new shape behind a flag; verify parity metrics
  4. 4Contract: remove old columns only after N days of clean telemetry
  5. 5Never rename or drop during peak; schedule low-traffic windows
  6. 6Test every migration against a production-size snapshot first

Common Pitfalls

  • ▲CREATE INDEX without CONCURRENTLY blocking writes
  • ▲Deploying code that assumes new column before migration runs

Commands

Install with skills CLI
$ npx skills add aniruddhaadak80/skills --skill databases-zero-downtime-migrations
Install globally
$ npx skills add aniruddhaadak80/skills --skill databases-zero-downtime-migrations -g

Tags

#migrations#deployments#sql#backend-engineering#databases

Related skills

Normalize enough to stay consistent, denormalize deliberately where reads demand it.

⚙️ Backend Engineering·~35m

Normalize enough to stay consistent, denormalize deliberately where reads demand it.

⚙️ Backend Engineering·~35m

Normalize enough to stay consistent, denormalize deliberately where reads demand it.

⚙️ Backend Engineering·~35m