diff --git a/api/alembic/env.py b/api/alembic/env.py index 3e563e1..694d4dc 100644 --- a/api/alembic/env.py +++ b/api/alembic/env.py @@ -18,7 +18,7 @@ if not db_url: "CARTSNITCH_DATABASE_URL_SYNC must be set. " "Example: postgresql://user:pass@localhost:5432/cartsnitch" ) -config.set_main_option("sqlalchemy.url", db_url) +config.set_main_option("sqlalchemy.url", db_url.replace("%", "%%")) target_metadata = Base.metadata diff --git a/common/alembic/env.py b/common/alembic/env.py index cd893e0..7cbf061 100644 --- a/common/alembic/env.py +++ b/common/alembic/env.py @@ -14,7 +14,7 @@ if config.config_file_name is not None: db_url = os.environ.get("CARTSNITCH_DATABASE_URL_SYNC") if db_url: - config.set_main_option("sqlalchemy.url", db_url) + config.set_main_option("sqlalchemy.url", db_url.replace("%", "%%")) target_metadata = Base.metadata