From 40e56128382da197ab03aa927602ad8dc514a2ed Mon Sep 17 00:00:00 2001 From: kari Barry Date: Wed, 15 May 2024 17:18:58 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=85=20Catch=20all=20extant=20node=20da?= =?UTF-8?q?ta=20in=20Virtual=20Table=20upon=20migrating.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ed3a4223a600_create_sqlite_table_for_fulltext_search.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tiled/catalog/migrations/versions/ed3a4223a600_create_sqlite_table_for_fulltext_search.py b/tiled/catalog/migrations/versions/ed3a4223a600_create_sqlite_table_for_fulltext_search.py index f27de2b8b..4a8dc721b 100644 --- a/tiled/catalog/migrations/versions/ed3a4223a600_create_sqlite_table_for_fulltext_search.py +++ b/tiled/catalog/migrations/versions/ed3a4223a600_create_sqlite_table_for_fulltext_search.py @@ -24,6 +24,11 @@ def upgrade(): """ CREATE VIRTUAL TABLE metadata_fts5 USING fts5(metadata, content='nodes', content_rowid='id'); """, + # Insert all existing node content into the fts5 table. + """ + INSERT INTO metadata_fts5(rowid, metadata) + SELECT id, metadata FROM nodes; + """ # Triggers keep the index synchronized with the nodes table. """ CREATE TRIGGER nodes_metadata_fts5_sync_ai AFTER INSERT ON nodes BEGIN