sqlx
sqlx copied to clipboard
Enable the execution of sqlx-cli against a read-only database
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.