Skip to main content

plan_migrations

Function plan_migrations 

Source
pub fn plan_migrations(
    connection: &ResolvedConnection,
    migrations_dir: &Path,
    migrations_table: &str,
    migrations_schema: &str,
) -> Result<MigrationPlan, CliError>
Expand description

Compares local migrations with the database’s tracking table without changing anything (migrate --plan / --verify).

§Errors

Returns CliError if no compiled driver matches the credentials, if connecting to the database fails, or if reading the migration tracking table or on-disk migration files fails.