create virtual table if not exists star_search using fts5 (name, id UNINDEXED, tokenize = 'trigram', content = 'stars', content_rowid=rowid); create trigger if not exists stars_update_search after insert on stars begin insert into star_search (rowid, name, id) values (new.rowid, new.name, new.id); end; create trigger if not exists stars_delete_search after delete on stars begin insert into star_search (star_search, rowid, name, id) values ('delete', old.rowid, old.name, old.id); end; create virtual table if not exists watch_search using fts5 (title, id UNINDEXED, tokenize = 'trigram', content = 'watches', content_rowid=rowid); create trigger if not exists watches_update_search after insert on watches begin insert into watch_search (rowid, title, id) values (new.rowid, new.title, new.id); end; create trigger if not exists watches_delete_search after delete on watches begin insert into watch_search (watch_search, rowid, title, id) values ('delete', old.rowid, old.title, old.id); end;