🔧 chore(base.py): add debug logs when creating and creating database and tables

The logger.debug() statements are added to provide more visibility into the process of creating the database and tables. This can be helpful for debugging and troubleshooting purposes.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-01 17:09:26 -03:00
commit 30c9b4f5a9

View file

@ -1,6 +1,6 @@
from langflow.settings import settings
from sqlmodel import SQLModel, Session, create_engine
from langflow.utils.logger import logger
if settings.database_url.startswith("sqlite"):
connect_args = {"check_same_thread": False}
@ -10,7 +10,9 @@ engine = create_engine(settings.database_url, connect_args=connect_args)
def create_db_and_tables():
logger.debug("Creating database and tables")
SQLModel.metadata.create_all(engine)
logger.debug("Database and tables created")
def get_session():