From a91c94c9f6bc84d0e43c670d6c232c61f975d542 Mon Sep 17 00:00:00 2001 From: Matthew Zhou Date: Fri, 11 Oct 2024 18:06:06 -0700 Subject: [PATCH] fix: Fix config bug in alembic (#1873) Co-authored-by: Matt Zhou --- alembic/env.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/alembic/env.py b/alembic/env.py index 69e3a60b55..f19996b1ee 100644 --- a/alembic/env.py +++ b/alembic/env.py @@ -5,8 +5,11 @@ from alembic import context from letta.base import Base +from letta.config import LettaConfig from letta.settings import settings +letta_config = LettaConfig.load() + # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config @@ -15,7 +18,7 @@ if settings.letta_pg_uri_no_default: config.set_main_option("sqlalchemy.url", settings.letta_pg_uri) else: - config.set_main_option("sqlalchemy.url", "sqlite:///" + os.path.join(config.recall_storage_path, "sqlite.db")) + config.set_main_option("sqlalchemy.url", "sqlite:///" + os.path.join(letta_config.recall_storage_path, "sqlite.db")) # Interpret the config file for Python logging. # This line sets up loggers basically.