Visualization¶
The toolkit now supports two graph visualization formats without requiring any hosted UI.
Mermaid¶
Mermaid output is designed for:
- Project documentation.
- Pull request descriptions.
- Team notes and migration reviews.
Generate it with:
python manage.py migration_inspect --format mermaid
python manage.py migration_inspect --offline --format mermaid
Example shape of the output:
flowchart TD
node_inventory_0001_initial["inventory.0001_initial"]
node_inventory_0002_add_sku["inventory.0002_add_sku"]
node_inventory_0001_initial --> node_inventory_0002_add_sku
Node styling is used to highlight:
- Root migrations.
- Leaf migrations.
- Merge migrations.
- Conflict heads in apps with multiple leaf nodes.
Graphviz DOT¶
DOT output is designed for:
- Graphviz rendering.
- Architecture docs.
- Automated graph pipelines.
Generate it with:
python manage.py migration_inspect --format dot
python manage.py migration_inspect --offline --format dot
Example shape of the output:
digraph migration_graph {
"inventory.0001_initial" -> "inventory.0002_add_sku";
}
Scope filtering¶
When you use --app, visualization stays focused on the visible app graph:
python manage.py migration_inspect --app analytics --format mermaid
That makes it easier to document or review one app at a time.