Files
buzz/migrations
Will Pfleger 0530ab4619 fix(db): use shape-based allowlist detection in migration 0012
The discriminator was `LIKE '%45001%'` — keying on an incidental member
of the allowlist kind set. A future negative blocklist containing 45001
would misclassify as allowlist and leave 31234 indexed.

Switch to detecting the allowlist's structural shape: the positive
allowlist (0008) falls through to `ELSE NULL::tsvector` for unlisted
kinds, while the legacy blocklist uses `THEN NULL::tsvector` for
excluded kinds. Checking for `ELSE NULL` in the `pg_get_expr` output
is robust against future kind list changes in either form.

Also fixes the no-op path comment: `LOCK TABLE ... IN SHARE ROW
EXCLUSIVE MODE` runs before the branch on every path, so the no-op
path does not "acquire no exclusive lock" — it does not escalate to
ACCESS EXCLUSIVE.
2026-07-14 09:12:09 -04:00
..