(ctx: CLIContext, app_labels: tuple[str, ...])
| 617 | |
| 618 | |
| 619 | async def heads(ctx: CLIContext, app_labels: tuple[str, ...]) -> None: |
| 620 | tortoise_config = _load_config(ctx) |
| 621 | apps_config = _select_apps(tortoise_config, app_labels or None) |
| 622 | apps_dict = {label: app.to_dict() for label, app in apps_config.items()} |
| 623 | apps_by_connection = _group_apps_by_connection(apps_dict) |
| 624 | |
| 625 | loader = MigrationLoader(apps_dict, _NoopRecorder(), load=False) |
| 626 | await loader.build_graph() |
| 627 | |
| 628 | for connection_name, subset in apps_by_connection.items(): |
| 629 | _emit_heads(loader, connection_name, subset) |
| 630 | |
| 631 | |
| 632 | async def sqlmigrate_cmd( |
no test coverage detected
searching dependent graphs…