(
applied: list[MigrationKey],
connection_name: str,
apps_config: dict[str, dict[str, Any]],
)
| 294 | |
| 295 | |
| 296 | def _emit_history( |
| 297 | applied: list[MigrationKey], |
| 298 | connection_name: str, |
| 299 | apps_config: dict[str, dict[str, Any]], |
| 300 | ) -> None: |
| 301 | by_app: dict[str, list[str]] = {label: [] for label in apps_config} |
| 302 | for key in applied: |
| 303 | if key.app_label in by_app: |
| 304 | by_app[key.app_label].append(key.name) |
| 305 | _echo_connection_header(connection_name) |
| 306 | for app_label in sorted(by_app): |
| 307 | _echo_app_header(app_label) |
| 308 | names = by_app[app_label] |
| 309 | if not names: |
| 310 | print(f" {_DIM}(no applied migrations){_RESET}") |
| 311 | continue |
| 312 | for name in names: |
| 313 | print(f" {_GREEN}-{_RESET} {app_label} {name}") |
| 314 | |
| 315 | |
| 316 | def _emit_heads( |
no test coverage detected
searching dependent graphs…