fix: Fix config bug in alembic (#1873)
Co-authored-by: Matt Zhou <mattzhou@Matts-MacBook-Pro.local>
This commit is contained in:
@@ -5,8 +5,11 @@ from sqlalchemy import engine_from_config, pool
|
||||
|
||||
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 @@ print(settings.letta_pg_uri_no_default)
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user