fix: add privilege migration note for db dump#4885
Open
7ttp wants to merge 2 commits intosupabase:developfrom
Open
fix: add privilege migration note for db dump#48857ttp wants to merge 2 commits intosupabase:developfrom
7ttp wants to merge 2 commits intosupabase:developfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughSummary by CodeRabbit
WalkthroughThis pull request adds a "Note on Privilege Migration" section to the Supabase database dump documentation. The new section explains that default privileges assigned to anon and authenticated roles in a new project can override specific privileges from a database dump. It provides a SQL workaround that revokes default privileges before restoring the dump, ensuring that the dumped privileges are correctly applied during migration between Supabase projects. Assessment against linked issues
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Comment |
avallete
approved these changes
Feb 23, 2026
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.
Problem
When migrating schemas between projects using
supabase db dumptable privileges are not preserved. Tables in the target database inherit ALL privileges from default privileges, causing specific GRANT statements to have no effect.
Solution
Document the privilege migration behavior and provide the SQL command to run before restoring.
Related