Repository navigation
feat: connect through a Unix socket (MySQL and PostgreSQL) - #296
Merged
Merged
Conversation
A server's `socket` setting, ?socket= in a URL, MySQL's ?unix_socket= or libpq's ?host=<directory> connect through a Unix-domain socket instead of TCP, for the diff and the migration runner alike. MySQL names the socket file; PostgreSQL the directory holding it, and a .s.PGSQL.<port> file is read as its directory and port. A MySQL server given only a socket needs no host or port. The pg_dump renderer passes a socket directory as ?host=, since it cannot stand where a host name goes in a URI. A config file's `driver` now applies when --driver is not typed: the option's own default overrode it, so `driver: pgsql` in a config file was read as MySQL. Fixes #44 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.



Connect through a Unix-domain socket instead of TCP, on MySQL and PostgreSQL, for
diffand the migration runner.How to name the socket
socketkey on the server, as A way to specify a non-standard socket? #44 asked:?socket=for either driver, MySQL's?unix_socket=, or libpq's?host=<directory>. The libpq form may leave the host out of the URL:postgres://app:secret@/orders?host=/var/run/postgresql..s.PGSQL.<port>file is read as its directory and port.pg_dumprenderer passes a socket directory as?host=, so PostgreSQL tables are still rendered bypg_dumpover a socket.Also fixed: a config file's
drivernow applies when--driverisn't typed. The option's own default overrode it, sodriver: pgsqlin a config file was read as MySQL.Tests
tests/Unit/SocketConnectionTest.php: adapter configs, URL forms and migration configs.PgDumpCommandTest: the socket connection string. It fails without the change.DiffCommandTest: a config file'sdriver, run end to end on SQLite. It fails without the change.diffworked through URLs and through config files, and PostgreSQL output came frompg_dump.Fixes #44
🤖 Generated with Claude Code