pub async fn run(
database_url: &str,
migrations_dir: impl AsRef<Path>,
) -> Result<Vec<Migration>, TypedError>Expand description
Run all pending migrations. Returns the list of migrations newly applied, in the order they ran. Each migration runs in its own transaction.
Holds a session-level advisory lock for the duration of the call so that concurrent runners (e.g. multiple pods starting at once) serialize rather than racing on the same pending migration.