summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--database.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/database.h b/database.h
index a701a9d..a0cba04 100644
--- a/database.h
+++ b/database.h
@@ -42,7 +42,7 @@
 
 #define DATABASE_PATH "litterbox/litterbox.sqlite"
 
-enum { DatabaseVersion = 2 };
+enum { DatabaseVersion = 3 };
 
 #define ENUM_TYPE \
 	X(Privmsg, "privmsg") \
@@ -282,6 +282,7 @@ static const char *InitSQL = SQL(
 		target TEXT,
 		message TEXT
 	);
+	CREATE INDEX eventsTime ON events (time);
 
 	CREATE VIEW text (
 		event, network, channel, query, nick, user, target, message
@@ -322,7 +323,7 @@ static const char *InitSQL = SQL(
 		UNIQUE (host, port)
 	);
 
-	PRAGMA user_version = 2;
+	PRAGMA user_version = 3;
 
 	COMMIT TRANSACTION;
 );
@@ -357,6 +358,11 @@ static const char *MigrationSQL[] = {
 		);
 		PRAGMA user_version = 2;
 	),
+
+	SQL(
+		CREATE INDEX eventsTime ON events (time);
+		PRAGMA user_version = 3;
+	),
 };
 
 static inline void dbMigrate(void) {
19&follow=1'>Bump version.Jason A. Donenfeld 2014-06-29remove debug fprinf() calls that sneaked in with commit 79c985Christian Hesse 2014-06-28git: update to 2.0.1Christian Hesse 2014-06-28ui-patch: Flush stdout after outputting dataJohn Keeping 2014-06-28ui-log: ignore unhandled argumentsJohn Keeping 2014-06-28git: update for git 2.0Christian Hesse 2014-04-17remove trailing whitespaces from source filesChristian Hesse 2014-04-12git: update to 1.9.2Christian Hesse 2014-04-05Fix cgit_parse_url when a repo url is contained in another repo urlJulian Maurice 2014-03-20Makefile: use more reliable git tarball mirrorJason A. Donenfeld 2014-03-20git: update to 1.9.1Christian Hesse