Initialize the databae properly
This commit is contained in:
6
admin/initdb.py
Normal file
6
admin/initdb.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from freeposte import db
|
||||
|
||||
|
||||
# Initialize the database
|
||||
db.create_all()
|
||||
db.session.commit()
|
||||
@@ -1,10 +1,5 @@
|
||||
from freeposte import app, db
|
||||
|
||||
|
||||
# Initialize the database if required (first launch)
|
||||
db.create_all()
|
||||
db.session.commit()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
|
||||
Reference in New Issue
Block a user