Commit Graph
1 Commits
Author SHA1 Message Date
Hermes 2e451093b6 T14/Bug #3 HIGH: Postgres search_vector trigger + backfill
The tasks/notes/projects/habits/domains tables all have a tsvector
search_vector column and a GIN index, but nothing was populating it.
GET /api/search returned zero results for every query.

This migration adds a BEFORE INSERT OR UPDATE trigger on each of the
five searchable tables. The trigger function uses to_tsvector with
the appropriate title + description/content columns and is named
project_e_search_vector_<table>_update. Drops any pre-existing trigger
of the same name so re-running the migration is safe.

Backfills 64 existing rows.

Parent: t_e1cbd87d
2026-08-01 04:15:14 +00:00