summary refs log tree commit diff
path: root/database.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-12-02 21:01:57 -0500
committerJune McEnroe <june@causal.agency>2019-12-02 21:01:57 -0500
commit1c0c1523c22407de05ba125d43bd3a588fd4a00f (patch)
tree710e72a7f2301097bda66b88ba237700feb57282 /database.h
parentEnable foreign key enforcement (diff)
downloadlitterbox-1c0c1523c22407de05ba125d43bd3a588fd4a00f.tar.gz
litterbox-1c0c1523c22407de05ba125d43bd3a588fd4a00f.zip
Make user and host NOT NULL as well
Since involving NULLs in comparisons is awkward, I think I'll just use
"*" for unknowns.
Diffstat (limited to 'database.h')
-rw-r--r--database.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/database.h b/database.h
index b98721b..ef62dde 100644
--- a/database.h
+++ b/database.h
@@ -120,8 +120,8 @@ static const char *InitSQL = {
 	"CREATE TABLE names ("
 		"id INTEGER PRIMARY KEY,"
 		"nick TEXT NOT NULL,"
-		"user TEXT,"
-		"host TEXT,"
+		"user TEXT NOT NULL,"
+		"host TEXT NOT NULL,"
 		"UNIQUE (nick, user, host)"
 	");"
 	"CREATE TABLE events ("