Skip to content

Commit

Permalink
hotfix for sanctuary alembic env to use correct environment variable …
Browse files Browse the repository at this point in the history
…for database url (#115)
  • Loading branch information
critch646 authored Feb 29, 2024
1 parent 7eec0ca commit f1a0b2e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/api/alembic/sanctuary/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit f1a0b2e

Please sign in to comment.