summary refs log tree commit diff
path: root/database.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-12-25 17:34:19 -0500
committerJune McEnroe <june@causal.agency>2019-12-25 17:34:19 -0500
commita850d03599e3f90ee16f78814c702eabae4416f2 (patch)
treea0354a93562e403dd3d5201108d3aff374ea6974 /database.h
parentInsert existing topics into the database (diff)
downloadlitterbox-a850d03599e3f90ee16f78814c702eabae4416f2.tar.gz
litterbox-a850d03599e3f90ee16f78814c702eabae4416f2.zip
Insert MOTDs into the database
Diffstat (limited to '')
-rw-r--r--database.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/database.h b/database.h
index 3d88757..fa0dc10 100644
--- a/database.h
+++ b/database.h
@@ -210,6 +210,13 @@ static inline int dbVersion(void) {
 static const char *InitSQL = SQL(
 	BEGIN TRANSACTION;
 
+	CREATE TABLE motds (
+		time DATETIME NOT NULL,
+		network TEXT NOT NULL,
+		motd TEXT NOT NULL,
+		UNIQUE (network, motd)
+	);
+
 	CREATE TABLE contexts (
 		context INTEGER PRIMARY KEY,
 		network TEXT NOT NULL,