MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / backwards_plan

Method backwards_plan

tortoise/migrations/graph.py:134–137  ·  view source on GitHub ↗
(self, target: MigrationKey)

Source from the content-addressed store, hash-verified

132 return self._iterative_dfs(self.node_map[target], forwards=True)
133
134 def backwards_plan(self, target: MigrationKey) -> list[MigrationKey]:
135 if target not in self.nodes:
136 raise ValueError(f"Unknown migration target {target}")
137 return self._iterative_dfs(self.node_map[target], forwards=False)
138
139 def _iterative_dfs(self, start: Node, *, forwards: bool) -> list[MigrationKey]:
140 visited: list[MigrationKey] = []

Callers 2

_backward_planMethod · 0.80

Calls 1

_iterative_dfsMethod · 0.95

Tested by 1