Write safe, reversible database migrations for this repo's conventions. Use for any schema change.
Installation
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Write safe, reversible database migrations for this repo's conventions. Use for any schema change.
when_to_use
add/alter a table, column, index, or constraint
targets
["*"]
Migration Writer
Read the current schema first. Match the repo's migration tool and naming (NNN_<verb>_<noun>).
Write BOTH up and down. A migration you can't reverse is a migration you can't deploy safely.
Live-safe: on a hot table, adding a NOT NULL column with no default, or an index without CONCURRENTLY, takes a blocking lock. Split into steps: add nullable → backfill → add constraint.
Backfill large tables in batches, not one statement.
Never edit an already-merged migration - add a new one.
Test with a dry-run before committing. Output the migration + the exact deploy order.