Skip to main content

migrate

Function migrate 

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

Applies every migration this crate carries to a pool the caller owns.

Equivalent to PgStores::migrate without the store, for a deployment that migrates from a separate binary. It does not create a schema: point the pool’s search_path at one that exists, or use PgStores::migrate, which creates the configured schema first.

§Errors

  • MigrateError when a migration fails or an already-applied migration no longer matches its recorded checksum.