From 6c82c1e785847986d9adda4fc4c3d637f94d37fe Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 11 Jul 2020 14:23:51 -0400 Subject: Replace time index with (context, time) index This is what it should have been... --- database.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/database.h b/database.h index e2d52ff..46679f5 100644 --- a/database.h +++ b/database.h @@ -42,7 +42,7 @@ #define DATABASE_PATH "litterbox/litterbox.sqlite" -enum { DatabaseVersion = 4 }; +enum { DatabaseVersion = 5 }; #define ENUM_TYPE \ X(Privmsg, "privmsg") \ @@ -282,7 +282,7 @@ static const char *InitSQL = SQL( target TEXT, message TEXT ); - CREATE INDEX eventsTime ON events (time); + CREATE INDEX eventsContextTime ON events (context, time); CREATE VIEW text ( event, network, channel, query, nick, user, target, message @@ -323,7 +323,7 @@ static const char *InitSQL = SQL( UNIQUE (host, port) ); - PRAGMA user_version = 4; + PRAGMA user_version = 5; COMMIT TRANSACTION; ); @@ -370,9 +370,17 @@ static const char *MigrationSQL[] = { UPDATE motds SET time = strftime('%s', time); UPDATE topics SET time = strftime('%s', time); UPDATE events SET time = strftime('%s', time); - CREATE INDEX IF NOT EXISTS eventsTime ON events (time); + // Don't bother creating the index that will be immediately dropped in + // version 5. + // CREATE INDEX IF NOT EXISTS eventsTime ON events (time); PRAGMA user_version = 4; ), + + SQL( + DROP INDEX IF EXISTS eventsTime; + CREATE INDEX eventsContextTime ON events (context, time); + PRAGMA user_version = 5; + ), }; static inline void dbMigrate(void) { -- cgit 1.4.1 uthor'>author
path: root/compat/arc4random_freebsd.h (unfollow)
Commit message (Collapse)Author
2022-02-27tls_signer: Replace ECDSA_METHOD with EC_KEY_METHODJune McEnroe
2022-02-27tls: Replace ECDSA_METHOD with EC_KEY_METHODJune McEnroe
2022-02-27Import LibreSSL 3.5.0June McEnroe
2021-11-29tls: Revert accidentally(?) reverted upstream 3.4.2June McEnroe
2021-11-29Import LibreSSL 3.4.2June McEnroe
2021-10-14Import LibreSSL 3.4.1June McEnroe
2021-09-17Import LibreSSL 3.4.0June McEnroe
2021-08-24Import LibreSSL 3.3.4June McEnroe
2021-05-25Bump version to 3.3.3p1 3.3.3p1June McEnroe
2021-05-25build: Add scripts to EXTRA_DISTJune McEnroe
2021-05-25import: Add missing scripts/wrap-compiler-for-flag-checkJune McEnroe
2021-05-08Import LibreSSL 3.3.3June McEnroe
2021-04-18build: Remove added x509_verify.3 links 3.3.2June McEnroe
2021-04-18tls: Use EC_KEY_set_ex_dataJune McEnroe
2021-04-18Import LibreSSL 3.3.2June McEnroe
2021-03-05Bump version to 3.3.1p1 3.3.1p1June McEnroe
2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe
Some compat sources (getentropy_linux.c for example) require OpenSSL. Reported by Robert Scheck.
2020-12-15Import LibreSSL 3.3.1June McEnroe
2020-11-24Import LibreSSL 3.3.0June McEnroe
2020-10-22Import LibreSSL 3.2.2June McEnroe
2020-09-29Import LibreSSL 3.2.1June McEnroe
2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe
2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe
2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe