sqlx breaking changes
cargo165 curated breaking changes across major versions of sqlx. Use this as a migration checklist before bumping dependencies.
- 0.8.6 \u2192 0.9.0-alpha.1behavior
Breaking behavior change: implementations parsing `tracing` logs from SQLx will need to update the spelling.
- 0.8.6 \u2192 0.9.0-alpha.1behavior
Default features of library crates can be hard to completely turn off because of [feature unification],
- 0.8.6 \u2192 0.9.0-alpha.1behavior
`sqlx-cli` has it enabled by default, but `sqlx` does **not**.
- 0.8.6 \u2192 0.9.0-alpha.1breaking
More to be implemented in future releases.
- 0.8.6 \u2192 0.9.0-alpha.1breaking
Enable feature `sqlx-toml` to use.
- 0.8.6 \u2192 0.9.0-alpha.1breaking
New functionality includes, but is not limited to:
- 0.8.6 \u2192 0.9.0-alpha.1breaking
Set global type overrides for the macros (supporting custom types)
- 0.8.6 \u2192 0.9.0-alpha.1breaking
Set characters to ignore when hashing migrations (e.g. ignore whitespace)
- 0.8.6 \u2192 0.9.0-alpha.1breaking
Significant changes to the `Migrate` trait
- 0.8.6 \u2192 0.9.0-alpha.1breaking
`sqlx::migrate::resolve_blocking()` is now `#[doc(hidden)]` and thus SemVer-exempt.
- 0.8.6 \u2192 0.9.0-alpha.1breaking
[[#3486]]: fix(logs): Correct spelling of aquired_after_secs tracing field [[@iamjpotts]]
- 0.8.6 \u2192 0.9.0-alpha.1breaking
SQLx and `sqlx-cli` now support per-crate configuration files (`sqlx.toml`)
- 0.8.6 \u2192 0.9.0-alpha.1breaking
[[#3383]]: feat: create `sqlx.toml` format [[@abonander]]
- 0.8.6 \u2192 0.9.0-alpha.1breaking
Guide: see `sqlx::_config` module in documentation.
- 0.8.6 \u2192 0.9.0-alpha.1breaking
Reference: [[Link](sqlx-core/src/config/reference.toml)]
- 0.8.6 \u2192 0.9.0-alpha.1breaking
Examples (written for Postgres but can be adapted to other databases; PRs welcome!):
- 0.8.6 \u2192 0.9.0-alpha.1breaking
Multiple databases using `DATABASE_URL` renaming and global type overrides: [[Link](examples/postgres/multi-database)]
- 0.8.6 \u2192 0.9.0-alpha.1breaking
Multi-tenant database using `_sqlx_migrations` renaming and multiple schemas: [[Link](examples/postgres/multi-tenant)]
- 0.8.6 \u2192 0.9.0-alpha.1breaking
Force use of `chrono` when `time` is enabled (e.g. when using `tower-sessions-sqlx-store`): [[Link][preferred-crates]]
- 0.8.6 \u2192 0.9.0-alpha.1breaking
Forcing `bigdecimal` when `rust_decimal` is enabled is also shown, but problems with `chrono`/`time` are more common.
- 0.8.6 \u2192 0.9.0-alpha.1breaking
**Breaking changes**:
- 0.8.6 \u2192 0.9.0-alpha.1removed
[[#3495]]: feat(postgres): remove lifetime from `PgAdvisoryLockGuard` [[@bonsairobo]]
- 0.8.6 \u2192 0.9.0-alpha.1renamed
Rename or relocate the `_sqlx_migrations` table (for multiple crates using the same database)
- 0.8.6 \u2192 0.9.0-alpha.1renamed
Rename `DATABASE_URL` for a crate (for multi-database workspaces)
- 0.8.0 \u2192 0.8.1api
It is not expected to receive any breaking changes for the 0.8.x release, but is not designed as a public API.
- 0.8.0 \u2192 0.8.1breaking
[[#3389]]: fix(cli): typo in error for required DB URL [[@ods]]
- 0.8.0 \u2192 0.8.1breaking
[[#3421]]: correct spelling of `MySqlConnectOptions::no_engine_substitution()` [[@kolinfluence]]
- 0.8.0 \u2192 0.8.1breaking
[[#3376]]: doc: hide `spec_error` module [[@abonander]]
- 0.8.0 \u2192 0.8.1breaking
This is a helper module for the macros and was not meant to be exposed.
- 0.8.0 \u2192 0.8.1breaking
[[#3382]]: feat: bumped to `libsqlite3-sys=0.30.1` to support sqlite 3.46 [[@CommanderStorm]]
- 0.8.0 \u2192 0.8.1breaking
[[#3385]]: chore(examples):Migrated the pg-chat example to ratatui [[@CommanderStorm]]
- 0.8.0 \u2192 0.8.1breaking
[[#3399]]: Upgrade to rustls 0.23 [[@djc]]
- 0.8.0 \u2192 0.8.1breaking
RusTLS now has pluggable cryptography providers: `ring` (the existing implementation),
- 0.8.0 \u2192 0.8.1breaking
The existing features activating RusTLS (`runtime-tokio-rustls`, `runtime-async-std-rustls`, `tls-rustls`)
- 0.8.0 \u2192 0.8.1breaking
Switch to the `tls-rustls-aws-lc-rs` feature to use the `aws-lc-rs` provider.
- 0.8.0 \u2192 0.8.1breaking
If using `runtime-tokio-rustls` or `runtime-async-std-rustls`,
- 0.8.0 \u2192 0.8.1breaking
See the RusTLS README for more details: <https://github.com/rustls/rustls?tab=readme-ov-file#cryptography-providers>
- 0.8.0 \u2192 0.8.1breaking
[[#2786]]: fix(sqlx-cli): do not clean sqlx during prepare [[@cycraig]]
- 0.8.0 \u2192 0.8.1breaking
[[#3354]]: sqlite: fix inconsistent read-after-write [[@ckampfe]]
- 0.8.0 \u2192 0.8.1breaking
[[#3371]]: Fix encoding and decoding of MySQL enums in `sqlx::Type` [[@alu]]
- 0.8.0 \u2192 0.8.1breaking
[[#3374]]: fix: usage of `node12` in `SQLx` action [[@hamirmahal]]
- 0.8.0 \u2192 0.8.1breaking
[[#3380]]: chore: replace structopt with clap in examples [[@tottoto]]
- 0.8.0 \u2192 0.8.1breaking
[[#3386]]: fix(dependencys):bumped cargo_metadata to `v0.18.1` to avoid yanked `v0.14.3` [[@CommanderStorm]]
- 0.8.0 \u2192 0.8.1breaking
[[#3417]]: Update version to 0.8 in README [[@soucosmo]]
- 0.8.0 \u2192 0.8.1breaking
[[#3441]]: fix: audit protocol handling [[@abonander]]
- 0.8.0 \u2192 0.8.1deprecated
Deprecates `MySqlConnectOptions::no_engine_subsitution()` (oops) in favor of the correctly spelled version.
- 0.8.0 \u2192 0.8.1deprecated
[[#3384]]: chore(tests): fixed deprecation warnings [[@CommanderStorm]]
- 0.8.0 \u2192 0.8.1removed
[[#3381]]: Fix CI after Rust 1.80, remove dead feature references [[@abonander]]
- 0.7.4 \u2192 0.8.0api
[[#2973]]: Generic Associated Types in Database, replacing HasValueRef, HasArguments, HasStatement [[@nitn3lav]]
- 0.7.4 \u2192 0.8.0breaking
[[#2736]]: Fix describe on PostgreSQL views with rules [[@tsing]]
- 0.7.4 \u2192 0.8.0breaking
Potentially breaking: nullability inference changes for Postgres.
- 0.7.4 \u2192 0.8.0breaking
[[#2869]]: Implement PgHasArrayType for all references [[@tylerhawkes]]
- 0.7.4 \u2192 0.8.0breaking
Conflicts with existing manual implementations.
- 0.7.4 \u2192 0.8.0breaking
[[#2940]]: fix: Decode and Encode derives (#1031) [[@benluelo]]
- 0.7.4 \u2192 0.8.0breaking
Changes lifetime obligations for field types.
- 0.7.4 \u2192 0.8.0breaking
[[#3064]]: Sqlite explain graph [[@tyrelr]]
- 0.7.4 \u2192 0.8.0breaking
Potentially breaking: nullability inference changes for SQLite.
- 0.7.4 \u2192 0.8.0breaking
[[#3123]]: Reorder attrs in sqlx::test macro [[@bobozaur]]
- 0.7.4 \u2192 0.8.0breaking
Potentially breaking: attributes on `#[sqlx::test]` usages are applied in the correct order now.
- 0.7.4 \u2192 0.8.0breaking
[[#3126]]: Make Encode return a result [[@FSMaxB]]
- 0.7.4 \u2192 0.8.0breaking
[[#3130]]: Add version information for failed cli migration (#3129) [[@FlakM]]
- 0.7.4 \u2192 0.8.0breaking
Breaking changes to `MigrateError`.
- 0.7.4 \u2192 0.8.0breaking
[[#3181]]: feat: no tx migration [[@cleverjam]]
- 0.7.4 \u2192 0.8.0breaking
(Postgres only) migrations that should not run in a transaction can be flagged by adding `-- no-transaction` to the beginning.
- 0.7.4 \u2192 0.8.0breaking
Breaking change: added field to `Migration`
- 0.7.4 \u2192 0.8.0breaking
[[#3184]]: [BREAKING} fix(sqlite): always use `i64` as intermediate when decoding [[@abonander]]
- 0.7.4 \u2192 0.8.0breaking
integer decoding will now loudly error on overflow instead of silently truncating.
- 0.7.4 \u2192 0.8.0breaking
some usages of the query!() macros might change an i32 to an i64.
- 0.7.4 \u2192 0.8.0breaking
[[#3252]]: fix `#[derive(sqlx::Type)]` in Postgres [[@abonander]]
- 0.7.4 \u2192 0.8.0breaking
[[#2697]]: fix(macros): only enable chrono when time is disabled [[@saiintbrisson]]
- 0.7.4 \u2192 0.8.0breaking
[[#2482]]: chore: bump syn to 2.0 [[@saiintbrisson]]
- 0.7.4 \u2192 0.8.0removed
Deprecated type ascription syntax in the query macros was removed.
- 0.7.0 \u2192 0.7.1behavior
[[#2605]]: Implement Default for QueryBuilder [[@Xydez]]
- 0.7.0 \u2192 0.7.1breaking
[[#2580]]: Update README.md now that 0.7.0 is no longer in alpha [[@saolof]]
- 0.7.0 \u2192 0.7.1breaking
[[#2551]]: Introduce build_query_scalar for QueryBuilder [[@iamquang95]]
- 0.7.0 \u2192 0.7.1breaking
[[#2616]]: feat(sqlx-core): add table function to database error [[@saiintbrisson]]
- 0.7.0 \u2192 0.7.1breaking
[[#2619]]: feat: allow opt-out of `PgHasArrayType` with `#[derive(sqlx::Type)]` [[@abonander]]
- 0.7.0 \u2192 0.7.1breaking
TL;DR: if you're getting errors from `#[derive(sqlx::Type)]` with `#[sqlx(transparent)]`
- 0.7.0 \u2192 0.7.1breaking
[[#2566]]: improve docs about migration files [[@jnnnnn]]
- 0.7.0 \u2192 0.7.1breaking
[[#2576]]: Major Version Update clap to 4.0 [[@titaniumtraveler]]
- 0.7.0 \u2192 0.7.1breaking
[[#2597]]: Bump webpki-roots to v0.24 [[@paolobarbolini]]
- 0.7.0 \u2192 0.7.1breaking
[[#2603]]: docs(changelog): be more verbose about offline mode breaking change [[@mrl5]]
- 0.7.0 \u2192 0.7.1breaking
[[#2553]]: Implement `Clone` for `PoolOptions` manually (#2548) [[@alilleybrinker]]
- 0.7.0 \u2192 0.7.1breaking
[[#2585]]: Fix for Issue #2549 - cannot use feature "rust_decimal" without also using "bigdecimal" [[@deneut]]
- 0.7.0 \u2192 0.7.1breaking
[[#2586]]: Fix optional dependency on sqlx-macros [[@kitterion]]
- 0.7.0 \u2192 0.7.1breaking
[[#2593]]: Correct mention of the `tls-native-tls` in the documentation. [[@denschub]]
- 0.7.0 \u2192 0.7.1breaking
[[#2613]]: Fix readme.md to reduce confusion about optional features (decimal->rust_decimal) [[@vabka]]
- 0.7.0 \u2192 0.7.1breaking
[[#2620]]: fix(sqlite/any): encode bool as integer [[@saiintbrisson]]
- 0.7.0 \u2192 0.7.1removed
[[#2599]]: Remove incorrect CAST in test database cleanup for MySQL. [[@fd]]
- 0.6.3 \u2192 0.7.0behavior
`AnyDriver` and `AnyConnection` now require either `sqlx::any::install_drivers()` or `sqlx::any::install_default_drivers()` to be called at some point during the process' lifetime before the first connection is made, as the set of possible drivers is now determined at runtime. This was determined to be the least painful way to provide knowledge of database drivers to `Any` without them being hardcoded.
- 0.6.3 \u2192 0.7.0breaking
[[#2109]]: feat: better database errors [[@saiintbrisson]]
- 0.6.3 \u2192 0.7.0breaking
[[#1984]]: Sqlite EXPLAIN type inference improvements [[@rongcuid]]
- 0.6.3 \u2192 0.7.0breaking
These cannot be blanket impls as it triggers an overflow in the compiler due to the lack of lazy normalization, and
- 0.6.3 \u2192 0.7.0breaking
We're expecting to do another major refactor of traits to incorporate generic associated types (GAT).
- 0.6.3 \u2192 0.7.0breaking
[[#2132]]: fix: use owned Builder pattern for ConnectOptions [[@ar3s3ru]]
- 0.6.3 \u2192 0.7.0breaking
Alongside this upgrade, we are now considering the linkage to `libsqlite3-sys` to be **semver-exempt**,
- 0.6.3 \u2192 0.7.0breaking
The fields of `Migrator` are now `#[doc(hidden)]` and semver-exempt; they weren't meant to be public.
- 0.6.3 \u2192 0.7.0breaking
[[#2039]]: Break drivers out into separate crates, clean up some technical debt [[@abonander]]
- 0.6.3 \u2192 0.7.0breaking
[[#2094]]: Update libsqlite3-sys to 0.25.1 [[@penberg]]
- 0.6.3 \u2192 0.7.0breaking
To fix, simply replace the `runtime-actix-*` feature with its `runtime-tokio-*` equivalent.
- 0.6.3 \u2192 0.7.0breaking
[[#1946]]: Fix compile time verification performance regression for sqlite [[@liningpan]]
- 0.6.3 \u2192 0.7.0breaking
[[#1960]]: Fix sqlite update return and order by type inference [[@tyrelr]]
- 0.6.3 \u2192 0.7.0breaking
To fix this breakage, simply add a dereference where an `impl Executor` is expected, as they both dereference to the inner connection type which will still implement it:
- 0.6.3 \u2192 0.7.0breaking
`&mut transaction` -> `&mut *transaction`
- 0.6.3 \u2192 0.7.0breaking
`&mut connection` -> `&mut *connection`
- 0.6.3 \u2192 0.7.0removed
The `runtime-actix-*` features have been deleted. They were previously changed to be aliases of their `runtime-tokio-*` counterparts for backwards compatibility reasons, but their continued existence is misleading as SQLx has no special knowledge of Actix anymore.
- 0.6.3 \u2192 0.7.0removed
The `AnyEncode` trait has been removed.
- 0.6.3 \u2192 0.7.0removed
The `mssql` feature and associated database driver has been deleted from the source tree. It will return as part of our planned SQLx Pro offering as a from-scratch rewrite with extra features (such as TLS) and type integrations that were previously missing.
- 0.6.3 \u2192 0.7.0removed
All deprecated items have been removed.
- 0.6.3 \u2192 0.7.0removed
The `offline` feature has been removed from the `sqlx` facade crate and is enabled unconditionally as most users are expected to have enabled it anyway and disabling it doesn't seem to appreciably affect compile times.
- 0.6.3 \u2192 0.7.0removed
The `git2` feature has been removed. This was a requested integration from a while ago that over time made less and less sense to be part of SQLx itself. We have to be careful with the crates we add to our public API as each one introduces yet another semver hazard. The expected replacement is to make `#[derive(sqlx::Type)]` useful enough that users can write wrapper types for whatever they want to use without SQLx needing to be specifically aware of it.
- 0.6.3 \u2192 0.7.0removed
The `Executor` impls for `Transaction` and `PoolConnection` have been deleted because they cannot exist in the new crate architecture without rewriting the `Executor` trait entirely.
- 0.6.3 \u2192 0.7.0renamed
The `decimal` feature has been renamed to `rust_decimal` to match the crate it actually provides integrations for.
- 0.6.1 \u2192 0.6.2breaking
[[#2074]]: fix: mssql uses unsigned for tinyint instead of signed [[@he4d]]
- 0.6.1 \u2192 0.6.2breaking
[[#2081]]: close unnamed portal after each executed extended query [[@DXist]]
- 0.6.1 \u2192 0.6.2breaking
[[#1081]]: Add `try_from` attribute for `FromRow` derive [[@zzhengzhuo]]
- 0.6.1 \u2192 0.6.2breaking
Exemplifies "out of sight, out of mind." It's surprisingly easy to forget about PRs when they get pushed onto
- 0.6.1 \u2192 0.6.2breaking
[[#2014]]: Support additional SQLCipher options in SQLite driver. [[@szymek156]]
- 0.6.1 \u2192 0.6.2breaking
[[#2052]]: Add issue templates [[@abonander]]
- 0.6.1 \u2192 0.6.2breaking
[[#2053]]: Add documentation for `IpAddr` support in Postgres [[@rakshith-ravi]]
- 0.6.1 \u2192 0.6.2breaking
[[#2062]]: Add extension support for SQLite [[@bradfier]]
- 0.6.1 \u2192 0.6.2breaking
[[#2063]]: customizable db locking during migration [[@fuzzbuck]]
- 0.6.1 \u2192 0.6.2breaking
[[#2025]]: Bump sqlformat to 2.0 [[@NSMustache]]
- 0.6.1 \u2192 0.6.2breaking
[[#2056]]: chore: Switch to sha1 crate [[@stoically]]
- 0.6.1 \u2192 0.6.2breaking
[[#2071]]: Use cargo check consistently in `prepare` [[@cycraig]]
- 0.6.1 \u2192 0.6.2breaking
[[#1991]]: Ensure migration progress is not lost for Postgres, MySQL and SQLite. [[@crepererum]]
- 0.6.1 \u2192 0.6.2breaking
[[#2023]]: Fix expansion of `#[sqlx(flatten)]` for `FromRow` derive [[@RustyYato]]
- 0.6.1 \u2192 0.6.2breaking
[[#2028]]: Use fully qualified path when forwarding to `#[test]` from `#[sqlx::test]` [[@alexander-jackson]]
- 0.6.1 \u2192 0.6.2breaking
[[#2040]]: Fix typo in `FromRow` docs [[@zlidner]]
- 0.6.1 \u2192 0.6.2breaking
[[#2046]]: added flag for PIPES_AS_CONCAT connection setting for MySQL to fix #2034 [[@marcustut]]
- 0.6.1 \u2192 0.6.2breaking
[[#2055]]: Use unlock notify also on `sqlite3_exec` [[@madadam]]
- 0.6.1 \u2192 0.6.2breaking
[[#2057]]: Make begin,commit,rollback cancel-safe in sqlite [[@madadam]]
- 0.6.1 \u2192 0.6.2breaking
[[#2058]]: fix typo in documentation [[@lovasoa]]
- 0.6.1 \u2192 0.6.2breaking
[[#2067]]: fix(docs): close code block in query_builder.rs [[@abonander]]
- 0.6.1 \u2192 0.6.2breaking
[[#2069]]: Fix `prepare` race condition in workspaces [[@cycraig]]\
- 0.6.1 \u2192 0.6.2breaking
NOTE: this changes the directory structure under `target/` that `cargo sqlx prepare` depends on.
- 0.6.1 \u2192 0.6.2breaking
[[#2072]]: SqliteConnectOptions typo [[@fasterthanlime]]
- 0.5.13 \u2192 0.6.0api
Fortunately, future upgrades should not be breaking as `webpki` is no longer exposed in the API.
- 0.5.13 \u2192 0.6.0api
Changed the signature for `Pool::close()` slightly
- 0.5.13 \u2192 0.6.0api
Changed the expected signatures for `PoolOptions::after_connect`, `before_acquire`, `after_release`
- 0.5.13 \u2192 0.6.0breaking
[[#1618]]: SQLite `chrono::DateTime<FixedOffset>` timezone fix [[@05storm26]]
- 0.5.13 \u2192 0.6.0breaking
[[#1455]]: Upgrade `time` to 0.3 [[@paolobarbolini]]
- 0.5.13 \u2192 0.6.0breaking
[[#1505]]: Upgrade `rustls` to 0.20 [[@paolobarbolini]]
- 0.5.13 \u2192 0.6.0breaking
[[#1384]]: (Postgres) Move `server_version_num` from trait to inherent impl [[@AtkinsChang]]
- 0.5.13 \u2192 0.6.0breaking
[[#1426]]: Bump `ipnetwork` to 0.19 [[@paolobarbolini]]
- 0.5.13 \u2192 0.6.0breaking
[[#1529]]: Upgrade `bigdecimal` to 0.3 [[@e00E]]
- 0.5.13 \u2192 0.6.0breaking
[[#1602]]: postgres: use `Oid` everywhere instead of `u32` [[@paolobarbolini]]
- 0.5.13 \u2192 0.6.0breaking
This drops the `Type`, `Decode`, `Encode` impls for `u32` for Postgres as it was misleading.
- 0.5.13 \u2192 0.6.0breaking
[[#1612]]: Make all `ConnectOptions` types cloneable [[@05storm26]]
- 0.5.13 \u2192 0.6.0breaking
`DateTime<FixedOffset>` will be stored in SQLite with the correct timezone instead of always in UTC.
- 0.5.13 \u2192 0.6.0breaking
[[#1733]]: Update `git2` to 0.14 [[@joshtriplett]]
- 0.5.13 \u2192 0.6.0breaking
[[#1734]]: Make `PgLTree::push()` infallible and take `PgLTreeLabel` directly [[@sebpuetz]]
- 0.5.13 \u2192 0.6.0breaking
[[#1785]]: Fix Rust type for SQLite `REAL` [[@pruthvikar]]
- 0.5.13 \u2192 0.6.0breaking
Makes the macros always map a `REAL` column to `f64` instead of `f32` as SQLite uses **only** 64-bit floats.
- 0.5.13 \u2192 0.6.0breaking
[[#1816]]: Improve SQLite support for sub-queries and CTEs [[@tyrelr]]
- 0.5.13 \u2192 0.6.0breaking
This likely will change the generated code for some invocations `sqlx::query!()` with SQLite.
- 0.5.13 \u2192 0.6.0breaking
[[#1821]]: Update `uuid` crate to v1 [[@paolobarbolini]]
- 0.5.13 \u2192 0.6.0breaking
[[#1901]]: Pool fixes and breaking changes [[@abonander]]
- 0.5.13 \u2192 0.6.0breaking
Now eagerly starts the pool closing, `.await`ing is only necessary if you want to ensure a graceful shutdown.
- 0.5.13 \u2192 0.6.0removed
Deleted `PoolConnection::release()` which was previously deprecated in favor of `PoolConnection::detach()`.
- 0.5.13 \u2192 0.6.0renamed
Renamed `PoolOptions::connect_timeout` to `acquire_timeout` for clarity.
- 0.2.6 \u2192 0.3.0breaking
`Query::fetch` (returned from `query()`) now returns a new `Cursor` type. `Cursor` is a Stream-like type where the
- 0.2.6 \u2192 0.3.0breaking
`sqlx::Row` now has a lifetime (`'c`) tied to the database connection. In effect, this means that you cannot store `Row`s or collect
- 0.2.6 \u2192 0.3.0breaking
`HasSqlType<T>: Database` is now `T: Type<Database>` to mirror `Encode` and `Decode`
- 0.2.6 \u2192 0.3.0removed
Remove `PgTypeInfo::with_oid` and replace with `PgTypeInfo::with_name`
Get this data programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/breaking/cargo/sqlx