Skip to content

Commit

Permalink
Merge pull request #905 from MasoniteFramework/feature/875-1
Browse files Browse the repository at this point in the history
Add PostgresConnection to support SSL and tls options
  • Loading branch information
josephmancuso authored Oct 30, 2024
2 parents ce25c0a + bd6e473 commit 2e4c2fe
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 2e4c2fe

Please sign in to comment.