From 5491b763acd78554f452ce0fbcae495c5d6d8b9c Mon Sep 17 00:00:00 2001 From: fram3d Date: Tue, 16 Jan 2024 13:06:45 +0100 Subject: [PATCH] fix init db by adding context --- init_db.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init_db.py b/init_db.py index f57e56b..aa2e09c 100755 --- a/init_db.py +++ b/init_db.py @@ -3,7 +3,8 @@ from flaskapp import db print('[i] Trying to create databse...') try: - db.create_all() + with app.app_context(): + db.create_all() print('[+] Success you can proceed with deployment!') except: print('[-] Creating db failed :/')