sqlx icon indicating copy to clipboard operation
sqlx copied to clipboard

Enable the execution of sqlx-cli against a read-only database

Open manifest opened this issue 3 months ago • 0 comments

Does your PR solve an issue?

fixes #4105.

Is this a breaking change?

No. It enables the execution of sqlx-cli against a read-only database without altering its functionality.

Instead of attempting to create a table describing migrations, we just test for any record within it with the simple SELECT 1 FROM {table_name} and then create a table if necessary. That is implemented in AnyConnection because this is standard SQL and can serve as a general solution for any database supported by sqlx.

manifest avatar Nov 14 '25 22:11 manifest