# SQL Migrations

> Write, review, and sequence database schema migrations safely, with rollback scripts and zero-downtime patterns. Use when asked to add a column, change a table, or plan a schema change on Postgres or MySQL.

- Skill: `modiqo/sql-migrations` (Agent Skill)
- Install (CLI): `npx skillmds@latest add modiqo/sql-migrations`
- Raw SKILL.md: https://api.skillmd.com/api/skills/modiqo/sql-migrations/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: modiqo (https://skillmd.com/u/modiqo)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/modiqo/sql-migrations

---


# SQL migrations

## When to use

- Add a nullable column to the users table without downtime
- Plan a schema change for the orders table
- Write a rollback script for this migration
- Review this Postgres migration for locking problems

## Procedure

1. Classify the change as additive, destructive, or rewriting.
2. Choose the zero-downtime pattern.
3. Emit forward and rollback scripts.

