Skip to main content

diff_schema_steps

Function diff_schema_steps 

Source
pub fn diff_schema_steps(
    target: &SchemaDescriptor,
    current: &DbState,
    fill_index: &HashMap<(String, String), HashSet<String>>,
) -> Result<Vec<MigrationStep>, String>
Expand description

Compute the diff as one MigrationStep per logical schema-level question — for an interactive caller that confirms/rejects one object at a time instead of a flat DDL dump. fill_index marks columns whose NOT NULL constraint is deferred to a caller-supplied backfill (see diff_schema_ops_with_renames_and_fills’s doc comment).