Skip to main content

migrate

Function migrate 

Source
pub async fn migrate(
    pool: &PgPool,
    migrator: &Migrator,
) -> Result<(), MigrateError>
Expand description

Apply pending migrations. Sqlx holds a lock while it does, so services booting together take turns.

ยงErrors

Fails when a migration fails, or an applied one no longer matches.