mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-12-26 13:05:40 +00:00
Merge pull request #1279 from wrouesnel/wrouesnel/fix_env_migrations
Fix handling of passwords with % in the SQLALCHEMY_DATABASE_URI
This commit is contained in:
commit
d2cb80f747
@ -19,7 +19,7 @@ logger = logging.getLogger('alembic.env')
|
|||||||
# target_metadata = mymodel.Base.metadata
|
# target_metadata = mymodel.Base.metadata
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
config.set_main_option('sqlalchemy.url',
|
config.set_main_option('sqlalchemy.url',
|
||||||
current_app.config.get('SQLALCHEMY_DATABASE_URI'))
|
current_app.config.get('SQLALCHEMY_DATABASE_URI').replace("%","%%"))
|
||||||
target_metadata = current_app.extensions['migrate'].db.metadata
|
target_metadata = current_app.extensions['migrate'].db.metadata
|
||||||
|
|
||||||
# other values from the config, defined by the needs of env.py,
|
# other values from the config, defined by the needs of env.py,
|
||||||
|
Loading…
Reference in New Issue
Block a user