diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-11 23:41:29 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-11 23:41:29 +0200 |
| commit | 47beb3fe6ed6fdb75c2dd3a55362ad1aba3bbc3b (patch) | |
| tree | 2d52eac9a127a8b002dfa951e9b31e677617662b /.ruby-gemset | |
| parent | 57588a423878016c9981751d50337e37cddea778 (diff) | |
Make page_translations' search trigger self-installing
search_vector is populated by a raw Postgres trigger created via
execute() in a migration -- invisible to schema.rb, which only
represents structure Rails understands. Any database rebuilt from
schema.rb rather than replayed migrations (test, a fresh db:setup,
disaster recovery) silently lost full-text search entirely, with no
error -- NULL @@ anything is never true in Postgres.
Page.ensure_search_vector_trigger!, called from an after_initialize
initializer, reinstalls the trigger via CREATE OR REPLACE on every
boot, in every environment. Idempotent and cheap.
Diffstat (limited to '.ruby-gemset')
0 files changed, 0 insertions, 0 deletions
