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

Method _forward_plan

tortoise/migrations/executor.py:305–319  ·  view source on GitHub ↗
(
        self,
        target: MigrationTarget,
        applied: set[MigrationKey],
        graph: MigrationGraph,
    )

Source from the content-addressed store, hash-verified

303 return self._dedupe_plan(plan)
304
305 def _forward_plan(
306 self,
307 target: MigrationTarget,
308 applied: set[MigrationKey],
309 graph: MigrationGraph,
310 ) -> list[PlanStep]:
311 plan: list[PlanStep] = []
312 for key in graph.forwards_plan(MigrationKey(app_label=target.app_label, name=target.name)):
313 if key in applied:
314 continue
315 migration = graph.nodes[key]
316 if not isinstance(migration, Migration):
317 raise ValueError(f"Missing migration for {key}")
318 plan.append(PlanStep(migration=migration, backward=False))
319 return plan
320
321 def _backward_plan(
322 self,

Callers 1

_migration_planMethod · 0.95

Calls 3

MigrationKeyClass · 0.90
PlanStepClass · 0.85
forwards_planMethod · 0.80

Tested by

no test coverage detected