(
self,
apps_config: dict[str, dict],
recorder: MigrationRecorder,
*,
load: bool = False,
)
| 11 | |
| 12 | class 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") |
nothing calls this directly
no test coverage detected