Repository navigation
Conversation
shuvroroy
marked this pull request as ready for review
November 11, 2026 06:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrations now emit structured
sqlx::migratetracing events before execution and on success or failure. Events include the migration version, description, and direction; successful completions also include the execution time. Instrumenting the built-in drivers givesMigrator, directMigratecalls,AnyConnection, and the CLI the same behavior.Both CLI binaries initialize a tracing subscriber after loading
.env. Logs go to stderr with a default level ofwarn;RUST_LOG=sqlx::migrate=infoenables migration progress logging. Existing status output stays on stdout. Already applied migrations, skips, dry runs, and validation failures do not emit execution events.Does your PR solve an issue?
Fixes #4509 by implementing migration logging as suggested in the maintainer's response.
Is this a breaking change?
No public SQLx API or migration execution changes. The CLI now emits warnings and errors to stderr by default, with filtering controlled by
RUST_LOG.Validation
DATABASE_URL, migration suites pass with PostgreSQL 17 CA verification and MySQL 8/MariaDB 11.4 client certificate paths using Smol and Rustls, plus SQLite.AnyConnectioncoverage.sqlx-clisuite passes (17 tests), including both binaries, stderr output, filters,.env,--no-dotenv, dry runs, skips, and failed migrations.-D warnings. Applying-D warningsto the database integration targets encounters the existingclippy::needless_question_markwarning insqlx-test/src/lib.rs:20.cargo fmt --all --checkandgit diff --checkpass.