🔧 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:
parent
4c8c3528de
commit
30c9b4f5a9
1 changed files with 3 additions and 1 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue