Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Commit 3814528

Browse files
committed
Fix pyodbc port mapping into server
1 parent f87e1b3 commit 3814528

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/test-suite.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
tests:
1212
name: "Python ${{ matrix.python-version }}"
1313
runs-on: "ubuntu-latest"
14+
env:
15+
MSSQL_SA_PASSWORD: Mssql123$#mssql
1416

1517
strategy:
1618
matrix:
@@ -41,7 +43,7 @@ jobs:
4143
mssql:
4244
image: mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04
4345
env:
44-
MSSQL_SA_PASSWORD: "Mssql123$#mssql"
46+
MSSQL_SA_PASSWORD: ${{ env.MSSQL_SA_PASSWORD }}
4547
ACCEPT_EULA: "Y"
4648
MSSQL_PID: Express
4749
ports:

databases/backends/mssql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ async def connect(self) -> None:
7878
user = self._database_url.username or getpass.getuser()
7979
password = self._database_url.password
8080

81-
dsn = f"Driver={driver};Database={database};Server={hostname};UID={user};PWD={password};Port={port}"
81+
dsn = f"Driver={driver};Database={database};Server={hostname},{port};UID={user};PWD={password};"
8282

8383
self._pool = await aioodbc.create_pool(
8484
dsn=dsn,

0 commit comments

Comments
 (0)