diff options
author | ubq323 <ubq323> | 2021-06-15 23:40:03 +0000 |
---|---|---|
committer | ubq323 <ubq323> | 2021-06-15 23:40:03 +0000 |
commit | 8ec18ae1d985aee2bcf146c1e4f783b91643406a (patch) | |
tree | 2ce44f58bf2be3a2e5ff140f6b1dd9174cb69efe /apioforum/db.py | |
parent | cdc3350992c11464c61782dd208d7671b56871ac (diff) | |
parent | 6096acce8b922af98e6846a687fcfd19cf0370cc (diff) |
merge tags into trunk
Diffstat (limited to 'apioforum/db.py')
-rw-r--r-- | apioforum/db.py | 12 |
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(): |