Skip to content

Commit

Permalink
Refactor PostgresConnection to support SSL options
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmancuso committed Oct 30, 2024
1 parent ce25c0a commit bd6e473
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/masoniteorm/connections/PostgresConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ def create_connection(self):
password=self.password,
host=self.host,
port=self.port,
sslmode=self.options.get("sslmode"),
sslcert=self.options.get("sslcert"),
sslkey=self.options.get("sslkey"),
sslrootcert=self.options.get("sslrootcert"),
options=(
f"-c search_path={self.schema or self.full_details.get('schema')}"
if self.schema or self.full_details.get("schema")
Expand All @@ -106,6 +110,10 @@ def create_connection(self):
password=self.password,
host=self.host,
port=self.port,
sslmode=self.options.get("sslmode"),
sslcert=self.options.get("sslcert"),
sslkey=self.options.get("sslkey"),
sslrootcert=self.options.get("sslrootcert"),
options=(
f"-c search_path={self.schema or self.full_details.get('schema')}"
if self.schema or self.full_details.get("schema")
Expand Down

0 comments on commit bd6e473

Please sign in to comment.