We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0975db6 commit 8d14458Copy full SHA for 8d14458
app/db/database.py
@@ -2,15 +2,17 @@
2
from typing import Any
3
4
from sqlalchemy import create_engine
5
-from sqlalchemy.orm import Session, declarative_base, sessionmaker
+from sqlalchemy.orm import DeclarativeBase, Session, sessionmaker
6
7
from app.core.config import settings
8
9
engine = create_engine(settings.SQLALCHEMY_DATABASE_URI.unicode_string())
10
11
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
12
13
-Base = declarative_base()
+
14
+class Base(DeclarativeBase):
15
+ pass
16
17
18
def get_db() -> Generator[Session, Any]:
0 commit comments