omgskills Get the Mac app
Skill

generate-migration

@getsentry 44k stars Updated 2026-07-28 Author match: High

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

apmcrash-reportingcrash-reportscsp-reportdevopsdjangoerror-loggingerror-monitoring

Install

Install this Claude and Codex skill with the command below. The command stays visible even when copy support is unavailable.

Install command
git clone https://github.com/getsentry/sentry /tmp/sentry && ln -s /tmp/sentry/.agents/skills/generate-migration ~/.claude/skills/generate-migration

View on GitHub

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.

More from this repo