Files
buzz/crates
Jude Edwards 166245b4f9 chore(db): accept the activity cache tables before their migration (#9815)
## Summary

**What it does.** It tells community deletion that two tables,
`channel_heads` and `thread_heads`, may exist. It lists them in
`PENDING_SCOPED_TABLES` and `APPROVAL_FORWARD_TABLES`. This release
creates no table and changes no schema. With it deployed, deletion
accepts both tables whether or not they exist yet. When they exist, it
purges their rows and verifies them. It also still executes a deletion
that was approved before they appeared.

**Why.** #9756 adds these two tables as caches for the `/buzz/v1`
activity list. Deletion's catalog check is an exact set. A relay without
this change would see them as unknown tables after #9756's migration
runs, and community deletion would fail for every community: during the
rollout, and again after any rollback. `docs/database.md` ("Adding a
tenant-owned `community_id` table", and the table in *What breaks the
old relay*) asks for this precursor release.

**Order of rollout.**
1. Merge and deploy this PR to every relay, deletion executor and
operator CLI.
2. Then merge #9756, which creates the tables (migration 0105) and moves
them to `EXPECTED_SCOPED_TABLES`. This PR's release becomes the rollback
floor once that migration runs.

**This must ship and deploy before #9756.**

**What users will notice.** Nothing.

**Out of scope.** The tables themselves and everything that uses them
are in #9756.

## Testing

- `cargo test -p buzz-db -p buzz-deletion` (unit tests, including the
list invariants) passes.
- Against a local Postgres:
`pending_scoped_tables_are_optional_purged_and_verified` passes with
both tables on the list.
- `approval_before_an_expand_migration_completes` needs S3 and Redis and
is outside the Postgres lane, so it runs only where that infrastructure
exists.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Jude Edwards <judeedwards@squareup.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 17:34:47 -05:00
..