aboutsummaryrefslogtreecommitdiff
path: root/setup.py
blob: 0ba2b5a78379c30901c62e1222165c00558b4a7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os, datetime

delete_db = False

if delete_db and os.path.isfile("app/data.sqlite"):
	os.remove("app/data.sqlite")

if not os.path.isfile("app/data.sqlite"):
	from app import models

	print("Creating database tables...")
	models.db.create_all()

	print("Filling database...")
	models.db.session.commit()
else:
	print("Database already exists")