aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-03-19 18:08:41 +0000
committerrubenwardy <rw@rubenwardy.com>2018-03-19 18:08:41 +0000
commit358fc4e5da67d5ebbb667d6bcafba7c7fa83ca97 (patch)
tree1a61b188daee7f582dcbad27b6592c11e2d51cef /setup.py
parent84f123a0ab529ac8a649e0e0ca4a49fd0c828db3 (diff)
downloadcheatdb-358fc4e5da67d5ebbb667d6bcafba7c7fa83ca97.tar.xz
Add package list and package view
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 9949776..fb9069d 100644
--- a/setup.py
+++ b/setup.py
@@ -2,10 +2,10 @@ import os, datetime
delete_db = False
-if delete_db and os.path.isfile("app/data.sqlite"):
- os.remove("app/data.sqlite")
+if delete_db and os.path.isfile("db.sqlite"):
+ os.remove("db.sqlite")
-if not os.path.isfile("app/data.sqlite"):
+if not os.path.isfile("db.sqlite"):
from app.models import *
print("Creating database tables...")
@@ -15,6 +15,17 @@ if not os.path.isfile("app/data.sqlite"):
ruben = User("rubenwardy")
ruben.github_username = "rubenwardy"
db.session.add(ruben)
+
+ mod1 = Mod()
+ mod1.name = "awards"
+ mod1.title = "Awards"
+ mod1.author = ruben
+ mod1.description = "Adds achievements and an API to register new ones."
+ mod1.repo = "https://github.com/rubenwardy/awards"
+ mod1.issueTracker = "https://github.com/rubenwardy/awards/issues"
+ mod1.forums = "https://forum.minetest.net/viewtopic.php?t=4870"
+ db.session.add(mod1)
+
db.session.commit()
else:
print("Database already exists")