diff --git a/src/ssb.db.c b/src/ssb.db.c index 81244a5a..95ee54e6 100644 --- a/src/ssb.db.c +++ b/src/ssb.db.c @@ -116,7 +116,8 @@ void tf_ssb_db_init(tf_ssb_t* ssb) " max_sequence INTEGER," " 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, "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, "