fix init db by adding context

This commit is contained in:
fram3d 2024-01-16 13:06:45 +01:00
parent 22c6084863
commit 5491b763ac
Signed by: fram3d
GPG Key ID: 938920E709EEA32A

View File

@ -3,7 +3,8 @@ from flaskapp import db
print('[i] Trying to create databse...') print('[i] Trying to create databse...')
try: try:
db.create_all() with app.app_context():
db.create_all()
print('[+] Success you can proceed with deployment!') print('[+] Success you can proceed with deployment!')
except: except:
print('[-] Creating db failed :/') print('[-] Creating db failed :/')