summaryrefslogtreecommitdiffhomepage
path: root/apioforum/db.py
diff options
context:
space:
mode:
authorubq323 <ubq323>2021-06-15 00:28:08 +0000
committerubq323 <ubq323>2021-06-15 00:28:08 +0000
commit1b9ac4113239d2e963787ba5048a473394ee0a7c (patch)
tree41ec237d1f93c88b4e8b670b8335573361b7b660 /apioforum/db.py
parent4bdf927a717fb3c4a4d21991072d4b3d3a639ed7 (diff)
add stylings for tags, and change styles of view forum page to give us more space too
Diffstat (limited to 'apioforum/db.py')
-rw-r--r--apioforum/db.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/apioforum/db.py b/apioforum/db.py
index c24aa0e..1d7bd2b 100644
--- a/apioforum/db.py
+++ b/apioforum/db.py
@@ -65,7 +65,19 @@ CREATE TRIGGER posts_au AFTER UPDATE ON posts BEGIN
INSERT INTO posts_fts(posts_fts, rowid, content) VALUES('delete', old.id, old.content);
INSERT INTO posts_fts(rowid, content) VALUES (new.id, new.content);
END;
+""",
"""
+CREATE TABLE tags (
+ id INTEGER PRIMARY KEY,
+ name TEXT NOT NULL,
+ text_colour TEXT NOT NULL,
+ bg_colour TEXT NOT NULL
+);
+CREATE TABLE thread_tags (
+ thread INTEGER NOT NULL REFERENCES threads(id),
+ tag INTEGER NOT NULL REFERENCES tags(id)
+);
+""",
]
def init_db():