flaskapp/init_db.py

12 lines
252 B
Python
Raw Normal View History

2023-10-20 13:20:56 +00:00
#!/usr/bin/env python3
from flaskapp import db
print('[i] Trying to create databse...')
try:
2024-01-16 12:06:45 +00:00
with app.app_context():
db.create_all()
2023-10-20 13:20:56 +00:00
print('[+] Success you can proceed with deployment!')
except:
print('[-] Creating db failed :/')