Page MenuHomePhabricator

D12694.diff
No OneTemporary

D12694.diff

diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
--- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
+++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
@@ -734,6 +734,17 @@
return false;
}
+bool create_message_search_table(sqlite3 *db) {
+ std::string query =
+ "CREATE VIRTUAL TABLE IF NOT EXISTS message_search USING fts5("
+ " original_message_id UNINDEXED,"
+ " message_id UNINDEXED,"
+ " processed_content,"
+ " tokenize = porter"
+ ");";
+ return create_table(db, query, "message_search");
+}
+
bool create_schema(sqlite3 *db) {
char *error;
sqlite3_exec(
@@ -890,6 +901,13 @@
" local_message_info TEXT NOT NULL"
");"
+ "CREATE VIRTUAL TABLE IF NOT EXISTS message_search USING fts5("
+ " original_message_id UNINDEXED,"
+ " message_id UNINDEXED,"
+ " processed_content,"
+ " tokenize = porter"
+ ");"
+
"CREATE INDEX IF NOT EXISTS media_idx_container"
" ON media (container);"
@@ -1151,7 +1169,8 @@
{46, {create_entries_table, true}},
{47, {create_message_store_local_table, true}},
{48, {create_messages_idx_target_message_type_time, true}},
- {49, {add_supports_auto_retry_column_to_p2p_messages_table, true}}}};
+ {49, {add_supports_auto_retry_column_to_p2p_messages_table, true}},
+ {50, {create_message_search_table, true}}}};
enum class MigrationResult { SUCCESS, FAILURE, NOT_APPLIED };
diff --git a/web/shared-worker/_generated/comm_query_executor.wasm b/web/shared-worker/_generated/comm_query_executor.wasm
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 28, 7:16 PM (21 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2594668
Default Alt Text
D12694.diff (1 KB)

Event Timeline