diff options
author | June McEnroe <june@causal.agency> | 2019-12-25 18:08:54 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-12-25 18:08:54 -0500 |
commit | 5022cfb9ee309475c2110994dfff86a7f32d614e (patch) | |
tree | f9d61205194c8546a5a5ec9c99b2ce01e1cd6e1a /database.h | |
parent | Insert MOTDs into the database (diff) | |
download | litterbox-5022cfb9ee309475c2110994dfff86a7f32d614e.tar.gz litterbox-5022cfb9ee309475c2110994dfff86a7f32d614e.zip |
Treat topics like motds
It's more like a cache of existing topics. events is still meant to record actual topic events.
Diffstat (limited to '')
-rw-r--r-- | database.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/database.h b/database.h index fa0dc10..810ce94 100644 --- a/database.h +++ b/database.h @@ -226,9 +226,10 @@ static const char *InitSQL = SQL( ); CREATE TABLE topics ( - context INTEGER NOT NULL REFERENCES contexts, time DATETIME NOT NULL, - topic TEXT + context INTEGER NOT NULL REFERENCES contexts, + topic TEXT NOT NULL, + UNIQUE (context, topic) ); CREATE TABLE names ( |