Skip to main content

Module diff

Module diff 

Source
Expand description

Schema diff engine for auto-migration generation.

Compares an “old” (current DB) and “new” (desired from code) SchemaSnapshot and produces a Vec<Operation> representing the DDL changes needed to migrate from old to new.

Structs§

SchemaDiff
Result of comparing two schema snapshots.

Enums§

AmbiguousChange
A change that cannot be automatically resolved and requires user intervention.
DiffWarning
Informational warnings about changes that the diff engine detected but cannot (or should not) translate into DDL operations automatically.

Functions§

auto_diff_schema
Compares two full schema snapshots and produces the operations needed to migrate from current to desired.
auto_diff_table
Compares a single table’s current snapshot against the desired schema derived from a #[derive(Table)] struct.