© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4mo ago•
5 replies
Ryry💻🤓

supabase db pull automatically adds revoke statements in migration scripts

Hi,

I am trying to replicate my prod DB in local - Followed documentation to run
supabase db pull
supabase db pull
. Migration scripts are generated with the correct schema and policies. However, I noticed that there are a bunch of revoke statements included that basically removes grants from my anon, authenticated and service_role roles. This causes unexpected behavior when testing locally as I always get the error
{"code": "42501", "details": null, "hint": null, "message": "permission denied for table ..."}
{"code": "42501", "details": null, "hint": null, "message": "permission denied for table ..."}
despite having the correct policies in place.

I managed to resolve it by simply commenting or deleting the
revoke
revoke
statements and running
supabase db reset
supabase db reset
. But every time I pull from production, the revoke statements get generated again in the new migration scripts, and I don't want this to be a repetitive process of me removing the revoke statements so I can test features locally.

Expectation: When running
supabase db pull
supabase db pull
, migration scripts should not include
revoke
revoke
statements automatically

I was wondering what could be the issue, or whether there is a step I have missed somewhere?

Thanks!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

supabase db pull
SupabaseSSupabase / help-and-questions
13mo ago
supabase db pull
SupabaseSSupabase / help-and-questions
3y ago
Supabase db pull, cast error
SupabaseSSupabase / help-and-questions
5mo ago
Trying db pull on supabase
SupabaseSSupabase / help-and-questions
12mo ago