Skip to content

Commit

Permalink
Don't censor password when sending it to MariaDB
Browse files Browse the repository at this point in the history
  • Loading branch information
nick8325 committed Feb 5, 2024
1 parent 99a714c commit 9af82bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions karp-backend/src/karp/main/migrations/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def run_migrations_online(): # noqa: ANN201

logger.info("migrating url: %s", karp_config.DATABASE_URL)
connectable = config.attributes.get("connection", None)
config.set_main_option("sqlalchemy.url", str(karp_config.DATABASE_URL))
config.set_main_option("sqlalchemy.url", karp_config.DATABASE_URL.render_as_string(hide_password=False))

if connectable is None:
connectable = engine_from_config(
Expand Down Expand Up @@ -86,7 +86,7 @@ def run_migrations_offline() -> None:
if os.environ.get("TESTING"):
raise RuntimeError("Running testing migrations offline currently not permitted.")

alembic.context.configure(url=str(karp_config.DATABASE_URL))
alembic.context.configure(url=karp_config.DATABASE_URL.render_as_string(hide_password=False))
with alembic.context.begin_transaction():
alembic.context.run_migrations()

Expand Down

0 comments on commit 9af82bb

Please sign in to comment.