Migrations
Evolve the schema.
Why migrations?
A migration is a versioned change to your database schema, like adding a table or column. They let your schema evolve safely and reproducibly.
- Tracked in version control
- Applied in order, exactly once
The sqlx-cli tool
sqlx ships a CLI for managing migrations. Install it once with cargo.
cargo install sqlx-cli --no-default-features --features postgres