Updated psycopg2 to psycopg thanks @DaanSelen haha

This commit is contained in:
Donald Zou 2025-07-08 16:31:03 +08:00
parent aa66a5ffb2
commit db6976a06a
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ def ConnectionString(database) -> str or None:
if not os.path.isdir(sqlitePath):
os.mkdir(sqlitePath)
if parser.get("Database", "type") == "postgresql":
cn = f'postgresql+psycopg2://{parser.get("Database", "username")}:{parser.get("Database", "password")}@{parser.get("Database", "host")}/{database}'
cn = f'postgresql+psycopg://{parser.get("Database", "username")}:{parser.get("Database", "password")}@{parser.get("Database", "host")}/{database}'
elif parser.get("Database", "type") == "mysql":
cn = f'mysql+mysqldb://{parser.get("Database", "username")}:{parser.get("Database", "password")}@{parser.get("Database", "host")}/{database}'
else:

View File

@ -10,7 +10,7 @@ requests
tcconfig
sqlalchemy
sqlalchemy_utils
psycopg2
psycopg
mysqlclient
tzlocal
python-jose