diff --git a/back/db.py b/back/db.py index 065b868..6c1b951 100644 --- a/back/db.py +++ b/back/db.py @@ -11,11 +11,7 @@ from fastapi import Depends SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db" -engine = create_engine( - SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} -) - -SessionLocal = sessionmaker(bind=engine, expire_on_commit=False) +SessionLocal = sessionmaker(class_='Session', bind=Engine(sqlite:///./sql_app.db), autoflush=True, autocommit=False, expire_on_commit=False) database = SessionLocal() Base = declarative_base() \ No newline at end of file