Django Migrations Inspector¶
Django Migrations Inspector is an open-source migration safety toolkit for Django teams.
It helps answer the questions that usually show up too late:
- What does this migration graph actually look like?
- Are there merge conflicts or multiple heads in the graph?
- Are pending migrations safe to deploy?
- Is rollback straightforward or dangerous?
The current implementation already provides:
- Typed migration graph loading.
- Graph checks focused on multiple heads, merge nodes, and dependency hotspots.
- Risk analysis that separates rollback blockers, irreversible history, destructive changes, and review-needed migrations.
- Rollback simulation with blockers, blast radius, cross-app impact, and reverse-step previews.
- Local-first output in text, JSON, Mermaid, and Graphviz DOT.
- A reusable Django management command that works in local development and CI.
Command mindset¶
Each command is meant to answer one concrete Django workflow question:
migration_inspect: Is the graph clean enough to reason about?migration_inspect risk: Can I deploy the pending migrations safely?migration_inspect audit: Which historical migrations need human review?migration_inspect rollback APP TARGET: Can I reverse this change path safely?
Why this toolkit exists¶
Django migrations are powerful, but teams still discover many migration problems too late:
- During CI.
- During deploys.
- During rollback attempts.
- After production drift is already confusing the release process.
This toolkit shifts that feedback left.
Open-source-first promise¶
The project is designed to stay useful without any paid service:
- All core functionality runs locally or in CI.
- No hosted backend is required.
- No account or telemetry is required.
- Rules, schemas, and documentation live in the repository.
Documentation hosting¶
This docs site is set up to work with both:
- GitHub Pages through the
.github/workflows/docs.ymlworkflow - Read the Docs through the
.readthedocs.yamlconfiguration
Next milestones¶
The next feature layers planned on top of the graph foundation are:
- Deeper risk rules and scoring.
- Lock and downtime heuristics.
- Environment snapshot export and drift comparison.
- Richer zero-downtime guidance and recovery workflows.