migrate

Function migrate 

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

Runs embedded database migrations.

Executes idempotent CREATE TABLE IF NOT EXISTS and CREATE INDEX IF NOT EXISTS statements to bring the schema up to date. Safe to call on every application startup.

ยงErrors

Returns sqlx::Error if any migration statement fails.