MCPcopy Index your code
hub / github.com/tortoise/tortoise-orm / heads

Function heads

tortoise/cli/cli.py:619–629  ·  view source on GitHub ↗
(ctx: CLIContext, app_labels: tuple[str, ...])

Source from the content-addressed store, hash-verified

617
618
619async 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
632async def sqlmigrate_cmd(

Callers 1

_run_headsFunction · 0.85

Calls 9

build_graphMethod · 0.95
MigrationLoaderClass · 0.90
_load_configFunction · 0.85
_select_appsFunction · 0.85
_emit_headsFunction · 0.85
itemsMethod · 0.80
_NoopRecorderClass · 0.70
to_dictMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…