From e45b4b7dd94404a357ec5252a7bc9a4143bd3a98 Mon Sep 17 00:00:00 2001 From: jcadam14 <41971533+jcadam14@users.noreply.github.com> Date: Thu, 18 Jan 2024 13:56:15 -0700 Subject: [PATCH] Replaced % with %% for alembic postgres connection URL (#97) Closes #96 --- db_revisions/env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_revisions/env.py b/db_revisions/env.py index 984b617..5547e1f 100644 --- a/db_revisions/env.py +++ b/db_revisions/env.py @@ -30,7 +30,7 @@ INST_DB_HOST = os.environ.get("INST_DB_HOST") INST_DB_NAME = os.environ.get("INST_DB_NAME") INST_DB_SCHEMA = os.environ.get("INST_DB_SCHEMA") -INST_CONN = f"postgresql://{INST_DB_USER}:{parse.quote(INST_DB_PWD, safe='')}@{INST_DB_HOST}/{INST_DB_NAME}" +INST_CONN = f"postgresql://{INST_DB_USER}:{(parse.quote(INST_DB_PWD, safe='')).replace('%', '%%')}@{INST_DB_HOST}/{INST_DB_NAME}" config.set_main_option("sqlalchemy.url", INST_CONN) # end specific SBL configuration