Download for MacApple silicon, macOS 14+
Skill

generate-migration

@getsentry Updated 2026-10-28

Generate or review Django database migrations for Sentry. Use when creating or reviewing migrations and data migrations, adding/removing columns or tables, adding indexes, or resolving migration conflicts.

apmcrash-reportingcrash-reportscsp-reportdevopsdjangoerror-loggingerror-monitoring

Install

With your agent

Install OMGSkills skill "getsentry/sentry:generate-migration" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

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.