Skip to main content

Module migrate

Module migrate 

Source
Expand description

Running database migrations via SQLx’s runtime migrator (ADR-011).

We reuse SQLx’s Migrator, which loads the migrations/*.sql files at runtime, tracks applied versions in its _sqlx_migrations table, and applies pending ones in order. The CLI stays synchronous: these helpers own a small current-thread Tokio runtime and block on it, so the gize CLI needs no async plumbing.

Structs§

Status
Applied vs pending migrations, each labelled <version>_<description>.

Functions§

run
Apply all pending migrations. Returns the labels of the ones newly applied.
status
Report which migrations are applied and which are pending.