Skip to content
Snippets Groups Projects
Unverified Commit e47a5fdf authored by Malthe Jørgensen's avatar Malthe Jørgensen Committed by Cam Saul
Browse files

Allow omitting port for Postgres and MySQL

Allows omitting the port in MB_DB_CONNECTION_URI when using Postgres and
MySQL.

Defaults to port 5432 for Postgres and 3306 for MySQL.
parent 3c13bc59
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@
(merge
{:classname "org.postgresql.Driver"
:subprotocol "postgresql"
:subname (make-subname host port db)
:subname (make-subname host (or port 5432) db)
;; I think this is done to prevent conflicts with redshift driver registering itself to handle postgres://
:OpenSourceSubProtocolOverride true}
(dissoc opts :host :port :db)))
......@@ -37,7 +37,7 @@
(merge
{:classname "org.mariadb.jdbc.Driver"
:subprotocol "mysql"
:subname (make-subname host port db)}
:subname (make-subname host (or port 3306) db)}
(dissoc opts :host :port :db)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment