Created
July 5, 2022 19:11
-
-
Save Schniz/58e75fec55bc42315816dced1e5f5533 to your computer and use it in GitHub Desktop.
Adding a new schema that's queryable in Supabase
This file contains 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
create schema if not exists my_new_schema; | |
alter default privileges for user supabase_admin in schema my_new_schema grant all | |
on sequences to postgres, anon, authenticated, service_role; | |
alter default privileges for user supabase_admin in schema my_new_schema grant all | |
on tables to postgres, anon, authenticated, service_role; | |
alter default privileges for user supabase_admin in schema my_new_schema grant all | |
on functions to postgres, anon, authenticated, service_role; | |
alter default privileges for user postgres in schema my_new_schema grant all | |
on sequences to postgres, anon, authenticated, service_role; | |
alter default privileges for user postgres in schema my_new_schema grant all | |
on tables to postgres, anon, authenticated, service_role; | |
alter default privileges for user postgres in schema my_new_schema grant all | |
on functions to postgres, anon, authenticated, service_role; | |
grant all privileges on schema my_new_schema to postgres; | |
GRANT USAGE ON SCHEMA my_new_schema TO postgres, anon, authenticated, service_role; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment