Skip to content

Commit

Permalink
fix: Fix config bug in alembic (#1873)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Zhou <[email protected]>
  • Loading branch information
mattzh72 and Matt Zhou authored Oct 12, 2024
1 parent 32fbd71 commit a91c94c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit a91c94c

Please sign in to comment.