cleanup: format.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 21m16s

This commit is contained in:
Cory McWilliams 2025-01-28 22:00:48 -05:00
parent 18bab849f7
commit a7bc3d301c

View File

@ -116,7 +116,8 @@ void tf_ssb_db_init(tf_ssb_t* ssb)
" max_sequence INTEGER," " max_sequence INTEGER,"
" max_timestamp READ" " max_timestamp READ"
")"); ")");
_tf_ssb_db_exec(db, "INSERT OR REPLACE INTO messages_stats (author, max_sequence, max_timestamp) SELECT author, MAX(sequence), MAX(timestamp) FROM messages GROUP BY author"); _tf_ssb_db_exec(
db, "INSERT OR REPLACE INTO messages_stats (author, max_sequence, max_timestamp) SELECT author, MAX(sequence), MAX(timestamp) FROM messages GROUP BY author");
} }
_tf_ssb_db_exec(db, _tf_ssb_db_exec(db,
"CREATE TRIGGER IF NOT EXISTS messages_ai_stats AFTER INSERT ON messages BEGIN INSERT INTO messages_stats(author, max_sequence, max_timestamp) VALUES (new.author, " "CREATE TRIGGER IF NOT EXISTS messages_ai_stats AFTER INSERT ON messages BEGIN INSERT INTO messages_stats(author, max_sequence, max_timestamp) VALUES (new.author, "