Skip to content

Commit

Permalink
Fix DB connection URL in env.py
Browse files Browse the repository at this point in the history
Previously, this line was returning `***` as the DB password
  • Loading branch information
Xiphoseer authored Jan 7, 2024
1 parent 09096fe commit 3027534
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions migrations/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
# target_metadata = mymodel.Base.metadata
config.set_main_option(
'sqlalchemy.url',
str(current_app.extensions['migrate'].db.get_engine().url).replace(
'%', '%%'))
current_app.config.get('SQLALCHEMY_DATABASE_URI')
)
target_metadata = current_app.extensions['migrate'].db.metadata

# other values from the config, defined by the needs of env.py,
Expand Down

0 comments on commit 3027534

Please sign in to comment.