(
self,
target: MigrationTarget,
applied: set[MigrationKey],
graph: MigrationGraph,
)
| 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, |
no test coverage detected