mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 17:05:41 +01:00
13 lines
No EOL
516 B
Python
13 lines
No EOL
516 B
Python
from private_gpt.users.core.config import SQLALCHEMY_DATABASE_URI
|
|
from sqlalchemy import create_engine
|
|
from sqlalchemy.orm import sessionmaker
|
|
|
|
engine = create_engine(SQLALCHEMY_DATABASE_URI, echo=True, future=True, pool_pre_ping=True)
|
|
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
|
|
|
# test_engine = create_engine(
|
|
# f"{settings.SQLALCHEMY_DATABASE_URI}_test", pool_pre_ping=True
|
|
# )
|
|
# TestingSessionLocal = sessionmaker(
|
|
# autocommit=False, autoflush=False, bind=test_engine
|
|
# ) |