From c4b22b863288445f3e5370438335dc52c3ad08f6 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 28 Mar 2022 18:04:45 -0500 Subject: [PATCH] Attempt to fix database not creating tables --- app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app.py b/app.py index 132577c..ca818f5 100644 --- a/app.py +++ b/app.py @@ -113,6 +113,10 @@ def create_app(): @app.cli.command("create_all") def db_create_all() -> None: + with app.app_context(): + db.create_all(app=app) + + with app.app_context(): db.create_all(app=app) return app