summary refs log tree commit diff
path: root/database.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-12-25 15:46:41 -0500
committerJune McEnroe <june@causal.agency>2019-12-25 15:46:41 -0500
commited99ecc2fe913fa047bc6e87cc363b60010befab (patch)
tree984c5c5912d4b1dea0046c46dffd0529b2746533 /database.h
parentHandle SIGINT and SIGTERM (diff)
downloadlitterbox-ed99ecc2fe913fa047bc6e87cc363b60010befab.tar.gz
litterbox-ed99ecc2fe913fa047bc6e87cc363b60010befab.zip
Insert existing topics into the database
Not sure how to handle the 333 reply that contains the user who set the
topic and the timestamp of when it was set, since they're two separate
messages that aren't really easily correlated since there's no guarantee
that you're even going to get a 333 at all.
Diffstat (limited to 'database.h')
-rw-r--r--database.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/database.h b/database.h
index 8d8c985..3d88757 100644
--- a/database.h
+++ b/database.h
@@ -218,6 +218,12 @@ static const char *InitSQL = SQL(
 		UNIQUE (network, name)
 	);
 
+	CREATE TABLE topics (
+		context INTEGER NOT NULL REFERENCES contexts,
+		time DATETIME NOT NULL,
+		topic TEXT
+	);
+
 	CREATE TABLE names (
 		name INTEGER PRIMARY KEY,
 		nick TEXT NOT NULL,