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

Method __init__

tortoise/migrations/loader.py:13–28  ·  view source on GitHub ↗
(
        self,
        apps_config: dict[str, dict],
        recorder: MigrationRecorder,
        *,
        load: bool = False,
    )

Source from the content-addressed store, hash-verified

11
12class MigrationLoader:
13 def __init__(
14 self,
15 apps_config: dict[str, dict],
16 recorder: MigrationRecorder,
17 *,
18 load: bool = False,
19 ) -> None:
20 self.apps_config = apps_config
21 self.recorder = recorder
22 self.disk_migrations: dict[MigrationKey, Migration] = {}
23 self.applied_migrations: set[MigrationKey] = set()
24 self.unmigrated_apps: set[str] = set()
25 self.migrated_apps: set[str] = set()
26 self.graph = MigrationGraph()
27 if load:
28 raise RuntimeError("MigrationLoader.build_graph is async; call it explicitly.")
29
30 def migrations_module(self, app_label: str) -> str | None:
31 return self.apps_config.get(app_label, {}).get("migrations")

Callers

nothing calls this directly

Calls 1

MigrationGraphClass · 0.90

Tested by

no test coverage detected