
Databases
SQLx Migrations in Rust and Running Them in CI and Prod
Version your schema with sqlx migrate: create files, run them at startup or in CI, embed them in the binary and handle the checksum error when a file changes.
3 min read
Tag
14 posts

Version your schema with sqlx migrate: create files, run them at startup or in CI, embed them in the binary and handle the checksum error when a file changes.

A guide to SQLx: async queries without an ORM, compile-time checked SQL, pools, migrations, transactions and the choices around them.