parameters of sessionmaker changed
This commit is contained in:
parent
b39d9ada27
commit
1dd37a72b4
@ -11,11 +11,7 @@ from fastapi import Depends
|
|||||||
|
|
||||||
SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db"
|
SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db"
|
||||||
|
|
||||||
engine = create_engine(
|
SessionLocal = sessionmaker(class_='Session', bind=Engine(sqlite:///./sql_app.db), autoflush=True, autocommit=False, expire_on_commit=False)
|
||||||
SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
|
|
||||||
)
|
|
||||||
|
|
||||||
SessionLocal = sessionmaker(bind=engine, expire_on_commit=False)
|
|
||||||
|
|
||||||
database = SessionLocal()
|
database = SessionLocal()
|
||||||
Base = declarative_base()
|
Base = declarative_base()
|
Loading…
x
Reference in New Issue
Block a user