From 4550bba562286992b27e667b071451e6886fbf44 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Wed, 12 Jan 2022 13:05:29 +0000 Subject: [PATCH] Release note for non-fts sqlite support --- CHANGELOG.txt | 1 + docs/releases/2.15.2.rst | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c68dc44f26..3a25ba6f08 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -40,6 +40,7 @@ Changelog * Fix: Ensure that bulk publish actions pick up the latest draft revision (Matt Westcott) * Fix: Ensure the `checkbox_aria_label` is used correctly in the Bulk Actions checkboxes (Vu Pham) * Fix: Prevent error on MySQL search backend when searching three or more terms (Aldán Creo) + * Fix: Allow wagtail.search app migrations to complete on versions of SQLite without full-text search support (Matt Westcott) 2.15.1 (11.11.2021) diff --git a/docs/releases/2.15.2.rst b/docs/releases/2.15.2.rst index 725720e8ad..ea442db290 100644 --- a/docs/releases/2.15.2.rst +++ b/docs/releases/2.15.2.rst @@ -18,3 +18,23 @@ Bug fixes * Ensure that bulk publish actions pick up the latest draft revision (Matt Westcott) * Ensure the ``checkbox_aria_label`` is used correctly in the Bulk Actions checkboxes (Vu Pham) * Prevent error on MySQL search backend when searching three or more terms (Aldán Creo) + * Allow wagtail.search app migrations to complete on versions of SQLite without full-text search support (Matt Westcott) + + +Upgrade considerations +====================== + +Support for SQLite without full-text search support +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This release restores the ability to run Wagtail against installations of SQLite that do not include the ``fts5`` extension for full-text search support. On these installations, the fallback search backend (without support for full-text queries) will be used, and the database table for storing indexed content will not be created. + +If SQLite is subsequently upgraded to a version with ``fts5`` support, existing databases will still be missing this table, and full-text search will continue to be unavailable until it is created. To correct this, first make a backup copy of the database (since rolling back the migration could potentially reverse other schema changes), then run: + +.. code-block:: console + + ./manage.py migrate wagtailsearch 0005 + ./manage.py migrate + ./manage.py update_index + +Additionally, since the database search backend now needs to run a query on initialisation to check for the presence of this table, calling ``wagtail.search.backends.get_search_backend`` during application startup may now fail with a "Models aren't loaded yet" error. Code that does this should be updated to only call ``get_search_backend`` at the point when a search query is to be performed.