Skip to content

Commit

Permalink
Merge pull request #86 from DarkflameUniverse/fix/migrate-env
Browse files Browse the repository at this point in the history
Fix DB connection URL in env.py
  • Loading branch information
aronwk-aaron authored Jan 7, 2024
2 parents 09096fe + 3027534 commit 69823be
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 69823be

Please sign in to comment.