taskmanager/init_db.py

12 lines
260 B
Python
Raw Permalink Normal View History

2023-10-20 13:20:56 +00:00
#!/usr/bin/env python3
2024-01-16 12:28:11 +00:00
from taskmanager import db, app
2023-10-20 13:20:56 +00:00
print('[i] Trying to create databse...')
try:
2024-01-16 12:28:11 +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 :/')