mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Create db directory
This commit is contained in:
parent
a0711f7eaf
commit
b5917f85eb
1 changed files with 3 additions and 0 deletions
|
@ -1,10 +1,13 @@
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
from os import makedirs
|
||||||
|
|
||||||
from flask_security import hash_password
|
from flask_security import hash_password
|
||||||
|
|
||||||
from advlabdb import app, db, user_datastore
|
from advlabdb import app, db, user_datastore
|
||||||
from advlabdb.models import *
|
from advlabdb.models import *
|
||||||
|
|
||||||
|
makedirs("db", exist_ok=True)
|
||||||
|
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
db.drop_all()
|
db.drop_all()
|
||||||
db.create_all()
|
db.create_all()
|
||||||
|
|
Loading…
Reference in a new issue