Repository navigation
refactor(schema): stop auto-fencing new tables in desired-state bootstrap - #8535
Open
ngoodger-block wants to merge 2 commits into
Open
ngoodger-block wants to merge 2 commits into
ngoodger-block wants to merge 2 commits into
Conversation
Signed-off-by: Nikolaj Goodger <ngoodger@squareup.com>
Signed-off-by: Nikolaj Goodger <ngoodger@squareup.com>
This was referenced Oct 22, 2026
ngoodger-block
marked this pull request as ready for review
October 23, 2026 04:30
ngoodger-block
had a problem deploying
to
codex-review
October 23, 2026 04:30 — with
GitHub Actions
Failure
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
This is a cleanup that brings the schema bootstrap in line with how the codebase works today, as asked for by
docs/database.md(#8273). Writes are now blocked during community deletion by application admission (begin_community_write_transaction), and that doc's Rule 1 says new tables must not add triggers. Butschema/community_write_fence.sqlstill looped over every table with acommunity_idcolumn and attached the old fence trigger to it. That meant a new table got a trigger on a fresh database and none on a migrated one, so the two schema paths disagreed and new tenant tables were blocked. The doc says this bootstrap change must land "before the feature, or as the feature's first PR."What?
Deletes the blanket fence loop and its
\ifromschema/schema.sql. Existing legacy tables keep their fences through their explicitschema/triggers/files, so no current table loses its fence and runtime behavior is unchanged. Adds a test that a newcommunity_idtable stays unfenced whileeventsandusersstay fenced, and updatesdocs/database.mdandARCHITECTURE.mdto match. It stands on its own; the media-sharing PRs (#8451, #8444) are the first to rely on it.buzz-review-completed