From 7831bc73ad807db252976078af63e8a2512cd3b0 Mon Sep 17 00:00:00 2001 From: Niklas Elsbrock Date: Fri, 4 Nov 2022 18:14:07 +0100 Subject: [PATCH] fix `db.create_all()` call Remove the `app` parameter from `db.create_all()` and move the call into an app context to be compatible with Flask-SQLAlchemy version 3.0. --- nateman/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nateman/__init__.py b/nateman/__init__.py index 6b9e5d6..c830c7e 100644 --- a/nateman/__init__.py +++ b/nateman/__init__.py @@ -73,9 +73,9 @@ def create_app() -> Flask: ) db.init_app(app) - db.create_all(app=app) with app.app_context(): + db.create_all() init_db(app) # Blueprints registrieren