From f1a0b2e487655b38a21cfe3e25adde1224c29ef7 Mon Sep 17 00:00:00 2001 From: Zeke Critchlow Date: Wed, 28 Feb 2024 16:21:08 -0800 Subject: [PATCH] hotfix for sanctuary alembic env to use correct environment variable for database url (#115) --- app/api/alembic/sanctuary/env.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/alembic/sanctuary/env.py b/app/api/alembic/sanctuary/env.py index ef1a89d..1ce13cd 100644 --- a/app/api/alembic/sanctuary/env.py +++ b/app/api/alembic/sanctuary/env.py @@ -24,10 +24,10 @@ target_metadata = BaseSanctuary.metadata # Environment based sqlalchemy url -user = os.environ.get("POSTGRES_USER") -password = os.environ.get("POSTGRES_PASSWORD") +user = os.environ.get("POSTGRES_SANCTUARY_USER") +password = os.environ.get("POSTGRES_SANCTUARY_PASSWORD") hostname = os.environ.get("POSTGRES_HOST") -db = "sanctuary" +db = os.environ.get("POSTGRES_SANCTUARY_DB") SQLALCHEMY_DATABASE_URL = f"postgresql+psycopg2://{user}:{password}@{hostname}/{db}" config.set_main_option("sqlalchemy.url", SQLALCHEMY_DATABASE_URL)