Skip to main content

generate_migration

Function generate_migration 

Source
pub fn generate_migration(
    schema_diff: &Schema<'_>,
    capability: &Capability,
) -> Migration
Expand description

Generates the SQL [Migration] for a schema diff in the dialect named by capability.sql. PostgreSQL gets one batch; other dialects get breakpoint markers so drivers can execute one statement at a time.

ยงPanics

Panics if capability.sql is None.