blob: 393495cf56c8d5410ca4b813f2666e5f76994767 [file] [log] [blame]
stgleb75c70412015-02-17 02:52:00 +02001from config import SQLALCHEMY_MIGRATE_REPO, basedir
2from web_app.app import db
3import shutil
4
5import os.path
6from os import remove
7
8db.create_all()
9if os.path.exists(SQLALCHEMY_MIGRATE_REPO):
10 shutil.rmtree(SQLALCHEMY_MIGRATE_REPO)
11
12db.drop_all()
13if os.path.exists(os.path.join(basedir, 'app.db')):
14 remove(os.path.join(basedir, 'app.db'))