Skip to content

Commit

Permalink
fix(migration): replace unquote with double percentages (apache#30532)
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro authored Oct 7, 2024
1 parent a098809 commit 163b71e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions superset/migrations/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# under the License.
import logging
import time
import urllib.parse
from logging.config import fileConfig

from alembic import context
Expand All @@ -43,8 +42,9 @@
"SQLite Database support for metadata databases will \
be removed in a future version of Superset."
)
decoded_uri = urllib.parse.unquote(DATABASE_URI)
config.set_main_option("sqlalchemy.url", decoded_uri)
# Escape % chars in the database URI to avoid interpolation errors in ConfigParser
escaped_uri = DATABASE_URI.replace("%", "%%")
config.set_main_option("sqlalchemy.url", escaped_uri)
target_metadata = Base.metadata # pylint: disable=no-member


Expand Down

0 comments on commit 163b71e

Please sign in to comment.