Upgrading sqlx 0.5 to 0.6
Breaking0.5.13 → 0.6.3Breaking16New21Changed11Fixed36Other17
BreakingUpgrade verdict
16 breaking changes.
In plain terms
- Upgrades `rustls` to 0.20; future upgrades should not be breaking as `webpki` is no longer exposed in the API.
- Pool configuration and connection handling APIs changed; update option names, callback signatures and close/release calls.
- Drops support for end-of-lifed database versions in `#[sqlx::test]`; see PR for details.
- Code that accessed the Postgres server version through a trait now uses a method directly on the connection type.
Must act Top 3 of 16 that need code or config changes
What you must change
Breaking16
Upgrades
rustls to 0.20; future upgrades should not be breaking as webpki is no longer exposed in the API.rustlswebpkiRenames
PoolOptions::connect_timeout to acquire_timeout, changes pool callback signatures, changes Pool::close(), and deletes PoolConnection::release().PoolOptions::connect_timeoutPoolOptions::acquire_timeoutPoolOptions::after_connectPoolOptions::before_acquirePoolOptions::after_releasePool::close()PoolConnection::release()PoolConnection::detach()Drops support for end-of-lifed database versions in
#[sqlx::test]; see PR for details.#[sqlx::test]Moves
server_version_num from a trait to an inherent impl for Postgres.server_version_numBumps
ipnetwork to 0.19, a backwards-incompatible dependency upgrade.ipnetworkUpgrades
time to 0.3, a backwards-incompatible dependency upgrade.timeUpgrades
bigdecimal to 0.3, a backwards-incompatible dependency upgrade.bigdecimalUses
Oid everywhere instead of u32 in Postgres, dropping the Type, Decode and Encode impls for u32.Oidu32TypeDecodeEncodeMakes all
ConnectOptions types cloneable.ConnectOptionsStores SQLite
chrono::DateTime<FixedOffset> with the correct timezone instead of always in UTC.chrono::DateTime<FixedOffset>Updates
git2 to 0.14, a backwards-incompatible dependency upgrade.git2Makes
PgLTree::push() infallible and take PgLTreeLabel directly.PgLTree::push()PgLTreeLabelFixes the Rust type for SQLite
REAL so macros always map it to f64 instead of f32.REALf64f32Improves SQLite support for sub-queries and CTEs, likely changing generated code for some
sqlx::query!() invocations.sqlx::query!()Updates the
uuid crate to v1, a backwards-incompatible dependency upgrade.uuidDerives
PgHasArrayType for #[sqlx(transparent)] types, reverted in 0.5.13 and postponed to this release.PgHasArrayType#[sqlx(transparent)]