@@ -35,7 +35,7 @@ CREATE VIRTUAL TABLE IF NOT EXISTS target_fts USING fts5(
3535 address,
3636 scope_id,
3737 created_time,
38- content='',
38+ content='target ',
3939);
4040
4141-- Create triggers to keep the FTS table in sync with the target table
@@ -68,6 +68,7 @@ CREATE TABLE IF NOT EXISTS alias (
6868 data TEXT NOT NULL
6969);
7070CREATE INDEX IF NOT EXISTS idx_alias_created_time ON alias(created_time DESC);
71+ CREATE INDEX IF NOT EXISTS idx_alias_destination_id ON alias(destination_id);
7172
7273CREATE VIRTUAL TABLE IF NOT EXISTS alias_fts USING fts5(
7374 id,
@@ -78,7 +79,7 @@ CREATE VIRTUAL TABLE IF NOT EXISTS alias_fts USING fts5(
7879 value,
7980 scope_id,
8081 created_time,
81- content='',
82+ content='alias ',
8283);
8384
8485CREATE TRIGGER IF NOT EXISTS alias_ai AFTER INSERT ON alias BEGIN
@@ -111,7 +112,7 @@ CREATE VIRTUAL TABLE IF NOT EXISTS group_fts USING fts5(
111112 description,
112113 scope_id,
113114 created_time,
114- content='',
115+ content='group ',
115116);
116117
117118CREATE TRIGGER IF NOT EXISTS group_ai AFTER INSERT ON "group" BEGIN
@@ -144,7 +145,7 @@ CREATE VIRTUAL TABLE IF NOT EXISTS role_fts USING fts5(
144145 description,
145146 scope_id,
146147 created_time,
147- content='',
148+ content='role ',
148149);
149150
150151CREATE TRIGGER IF NOT EXISTS role_ai AFTER INSERT ON role BEGIN
@@ -177,7 +178,7 @@ CREATE VIRTUAL TABLE IF NOT EXISTS user_fts USING fts5(
177178 description,
178179 scope_id,
179180 created_time,
180- content='',
181+ content='user ',
181182);
182183
183184CREATE TRIGGER IF NOT EXISTS user_ai AFTER INSERT ON user BEGIN
@@ -212,7 +213,7 @@ CREATE VIRTUAL TABLE IF NOT EXISTS credential_store_fts USING fts5(
212213 description,
213214 scope_id,
214215 created_time,
215- content='',
216+ content='credential_store ',
216217);
217218
218219CREATE TRIGGER IF NOT EXISTS credential_store_ai AFTER INSERT ON credential_store BEGIN
@@ -247,7 +248,7 @@ CREATE VIRTUAL TABLE IF NOT EXISTS scope_fts USING fts5(
247248 description,
248249 scope_id,
249250 created_time,
250- content='',
251+ content='scope ',
251252);
252253
253254CREATE TRIGGER IF NOT EXISTS scope_ai AFTER INSERT ON scope BEGIN
@@ -284,7 +285,7 @@ CREATE VIRTUAL TABLE IF NOT EXISTS auth_method_fts USING fts5(
284285 is_primary,
285286 scope_id,
286287 created_time,
287- content='',
288+ content='auth_method ',
288289);
289290
290291CREATE TRIGGER IF NOT EXISTS auth_method_ai AFTER INSERT ON auth_method BEGIN
@@ -321,7 +322,7 @@ CREATE VIRTUAL TABLE IF NOT EXISTS host_catalog_fts USING fts5(
321322 plugin_name,
322323 scope_id,
323324 created_time,
324- content='',
325+ content='host_catalog ',
325326);
326327
327328CREATE TRIGGER IF NOT EXISTS host_catalog_ai AFTER INSERT ON host_catalog BEGIN
@@ -374,7 +375,7 @@ CREATE VIRTUAL TABLE IF NOT EXISTS session_recording_fts USING fts5(
374375 target_scope_name,
375376 target_scope_parent_scope_id,
376377 created_time,
377- content='',
378+ content='session_recording ',
378379);
379380
380381CREATE TRIGGER IF NOT EXISTS session_recording_ai AFTER INSERT ON session_recording BEGIN
@@ -413,7 +414,7 @@ CREATE VIRTUAL TABLE IF NOT EXISTS session_fts USING fts5(
413414 user_id,
414415 scope_id,
415416 created_time,
416- content='',
417+ content='session ',
417418);
418419
419420CREATE TRIGGER IF NOT EXISTS session_ai AFTER INSERT ON session BEGIN
0 commit comments