Skip to content

Commit

Permalink
Fix creating message_fts table during database migration. Fixes #13034,
Browse files Browse the repository at this point in the history
fixes #13506
  • Loading branch information
bepaald authored Nov 21, 2024
1 parent 49eb80b commit 88f9556
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ object V175_FixFullTextSearchLink : SignalDatabaseMigration {

db.execSQL("CREATE VIRTUAL TABLE message_fts USING fts5(body, thread_id UNINDEXED, content=message, content_rowid=_id)")

// The newly created search table is empty, while its content-table (message) is not. To get the search
// table in a consistent state, it needs to be rebuilt.
db.execSQL("INSERT INTO message_fts(message_fts) VALUES ('rebuild')")

db.execSQL(
"""
CREATE TRIGGER message_ai AFTER INSERT ON message BEGIN
Expand Down

0 comments on commit 88f9556

Please # to comment.