etianen / django-watson

Full-text multi-table search application for Django. Easy to install and use, with good performance.
BSD 3-Clause "New" or "Revised" License
1.2k stars 129 forks source link

Error after updating django to latest version #281

Closed Pulkit-Sharma closed 3 years ago

Pulkit-Sharma commented 3 years ago

I have updated the django to latest version and even upgraded postgres from 9.6 to latest version 12. After upgrading getting this issue with watson.

Exception Type: IntegrityError

null value in column "search_tsv" violates not-null constraint

Exception Location: /usr/local/lib/python3.8/dist-packages/django/db/backends/utils.py, line 84, in _execute

/usr/bin/python3 3.8.5 ['/home/django_project', '/usr/local/bin', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages'] Sun, 07 Mar 2021 22:41:35 +0530

I am adding a post to database, watson is throwing this error.

etianen commented 3 years ago

Can I have the full traceback?

Pulkit-Sharma commented 3 years ago

The issue was with upgrading Postgre 9.6 to Postgres 12. watson_searchentry index trigger files were not copied in upgraded version. I droped watson_searchentry table and migrated again with watson. Copied old data to new table.

Since it was on live site, did not do much debugging. Anyway thanks.