Skip to content

Commit 85a3c57

Browse files
committed
handles special characters in database password
1 parent 742c339 commit 85a3c57

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

aim/digifeeds/database/migrations/env.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
config = context.config
1414

1515
# Set url from environment variable
16-
config.set_main_option("sqlalchemy.url", S.mysql_database)
16+
config.set_main_option(
17+
"sqlalchemy.url",
18+
# This is for handling passwords with special characters
19+
S.mysql_database.render_as_string(hide_password=False).replace("%", "%%"),
20+
)
1721

1822
# Interpret the config file for Python logging.
1923
# This line sets up loggers basically.

compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ services:
2828
environment:
2929
- MARIADB_ROOT_PASSWORD=password
3030
- MARIADB_USER=user
31-
- MARIADB_PASSWORD=password
31+
- MARIADB_PASSWORD=test@123
3232
- MARIADB_DATABASE=database
3333

3434
volumes:

env.development

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MARIADB_ROOT_PASSWORD=password
22
MARIADB_USER=user
3-
MARIADB_PASSWORD=password
3+
MARIADB_PASSWORD=test@123
44
MARIADB_DATABASE=database
55
DATABASE_HOST=database

0 commit comments

Comments
 (0)