Inline progress reporter for migration execution.
(event: str, app_label: str, name: str)
| 495 | |
| 496 | |
| 497 | def _progress_reporter(event: str, app_label: str, name: str) -> None: |
| 498 | """Inline progress reporter for migration execution.""" |
| 499 | label = f"{app_label}.{name}" |
| 500 | if event == "apply_start": |
| 501 | print(f" Applying {_CYAN}{label}{_RESET}...", end="", flush=True) |
| 502 | elif event == "apply_done": |
| 503 | print(f" {_GREEN}OK{_RESET}") |
| 504 | elif event == "rollback_start": |
| 505 | print(f" Rolling back {_YELLOW}{label}{_RESET}...", end="", flush=True) |
| 506 | elif event == "rollback_done": |
| 507 | print(f" {_GREEN}OK{_RESET}") |
| 508 | |
| 509 | |
| 510 | async def _run_migrate( |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…