djangowagtailfts5

How can I resolve fts5 error after I upgraded Wagtail


I have upgraded my Wagtail installation to 2.15.1 with Django 3.1.13

When I run manage.py migrate I get an error

django.db.utils.OperationalError: no such module: fts5

I have searched but cannot find any solutions to this problem

Can someone please help?

This is the code that running in django/db/backends/sqlite3/base.py when the error occurs

class SQLiteCursorWrapper(Database.Cursor):
    def execute(self, query, params=None):
        if params is None:
            return Database.Cursor.execute(self, query)

it fails on the line

            return Database.Cursor.execute(self, query)

the last 3 values of query are

 CREATE VIRTUAL TABLE wagtailsearch_indexentry_fts USING fts5(autocomplete, body, title)
 PRAGMA foreign_key_check
 PRAGMA foreign_keys = ON

The failure happens on the last of these


Solution

  • The problem was in wagtail

    I deleted the migrations folder from the site wagtail package and ran makemigrations and migrate. It now works