Fix result submission column permissions - #32
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
No result files to import. |
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.
What this changes
Browser result submissions fail with
42501: permission denied for table resultsbecause the payload includesruntime_flags,custom_runtime_id, andrevision, but the migrations that added those columns never extended the authenticated role's column-level write grants. Even stock submissions explicitly send these fields as null.Grant authenticated INSERT and UPDATE on those three columns and extend the database smoke test to exercise them during result creation and editing. Existing ownership policies and restrictions on verification and moderation columns remain intact.
Fixes #27.
This migration was already applied to production (
ujlacyedspjfekotemmd) using the Supabase CLI on 2026-09-18. Production verification confirmed the grants and migration-history entry. This PR records the deployed fix in the repository; subsequent database pushes will recognize it as applied. No frontend deployment is required. The profile-handle fix in #29 is separate.Checks
npm --prefix frontend run results:testpasses (14 tests).