Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3358320
D12694.id42661.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12694.id42661.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 4:07 AM (19 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2578305
Default Alt Text
D12694.id42661.diff (1 KB)
Attached To
Mode
D12694: [native](web) Add message_search fts5 table
Attached
Detach File
Event Timeline
Log In to Comment