How can Flask / SQLAlchemy be configured to create a new database connection if one is not present?
I have an infrequently visited Python / Flask server which uses S
IF you are using Flask-SQLAlchemy:
Seems like a fix is available: https://github.com/mitsuhiko/flask-sqlalchemy/issues/2
Sadly, the default installation (pip install flask-sqlalchemy) doesn't apply the patch properly yet, especially on this issue: https://github.com/e-dard/flask-sqlalchemy/commit/cf659f346e005d34257d256fa4c42889741fc31f
Getting the latest version from github should fix it.