generate-migration
Generate Django database migrations for Sentry. Use when creating migrations, adding/removing columns or tables, adding indexes, or resolving migration conflicts.
Install
Install this Claude and Codex skill with the command below. The command stays visible even when copy support is unavailable.
git clone https://github.com/getsentry/sentry /tmp/sentry && ln -s /tmp/sentry/.agents/skills/generate-migration ~/.claude/skills/generate-migration
From README
Generate Django Database Migrations Commands Generate migrations automatically based on model changes: For a specific app: Generate an empty migration (for data migrations or custom work): After Generating If you added a new model, ensure it's imported in the app's init.py Review the generated migration for correctness Run sentry django sqlmigrate to verify the SQL Apply the migration locally with sentry django migrate — Sentry's migration framework runs its safety checks on apply, so this catches unsafe ops (missing ispostdeployment, unsafe column changes, etc.) before CI does. When editing a generated migration (e.g. swapping DeleteModel for SafeDeleteModel), leave the auto-generated ispostdeployment comment block in place. It documents a non-obvious flag with concrete guidance for future migration authors — useful context, not fluff. Only remove a comment if it's stale or contradicts the code. Don't test the ORM Don't write tests that only exercise Django's ORM.