This commit is contained in:
Cory McWilliams 2024-03-05 20:49:30 -05:00
parent d059554464
commit 6d89c1da6e
2 changed files with 3 additions and 2 deletions

View File

@ -182,7 +182,8 @@ void tf_ssb_db_init(tf_ssb_t* ssb)
tf_printf("Done.\n");
}
_tf_ssb_db_exec(db, "CREATE TRIGGER IF NOT EXISTS messages_ai AFTER INSERT ON messages BEGIN INSERT INTO messages_fts(rowid, content) VALUES (new.rowid, json(new.content)); END");
_tf_ssb_db_exec(
db, "CREATE TRIGGER IF NOT EXISTS messages_ai AFTER INSERT ON messages BEGIN INSERT INTO messages_fts(rowid, content) VALUES (new.rowid, json(new.content)); END");
_tf_ssb_db_exec(db,
"CREATE TRIGGER IF NOT EXISTS messages_ad AFTER DELETE ON messages BEGIN INSERT INTO messages_fts(messages_fts, rowid, content) VALUES ('delete', old.rowid, "
"old.content); END");