Skip to content
Snippets Groups Projects
Commit 08aef105 authored by Malthe Jørgensen's avatar Malthe Jørgensen
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 a24756a5
Branches
Tags
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.
Please register or to comment