From 35dbbffd491242207ee25647249f78a2d4ee1f81 Mon Sep 17 00:00:00 2001 From: surtur Date: Fri, 7 Aug 2020 01:51:06 +0200 Subject: [PATCH] chore: print generated/executed SQL for debugging purposes --- app/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/database.py b/app/database.py index e32fc2c..11ff22f 100644 --- a/app/database.py +++ b/app/database.py @@ -5,7 +5,7 @@ from sqlalchemy.orm import sessionmaker SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db" engine = create_engine( - SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} + SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}, echo=True ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)