Skip to main content

Module migration_graph

Module migration_graph 

Source
Expand description

Dependency graph resolution for native migrations.

Pure logic — no runtime, no I/O. Input is a list of migration names and their dependency edges; output is a topologically-sorted application order or a CycleError naming the involved migrations.

Structs§

CycleError

Functions§

topological_sort
Sort migrations in topological order given edges (migration → depends_on).
would_create_cycle
Check whether adding edge from → to would create a cycle in the existing graph. Returns the cycle path if detected.