Skip to content

Instantly share code, notes, and snippets.

@Schniz
Created July 5, 2022 19:11
Show Gist options
  • Select an option

  • Save Schniz/58e75fec55bc42315816dced1e5f5533 to your computer and use it in GitHub Desktop.

Select an option

Save Schniz/58e75fec55bc42315816dced1e5f5533 to your computer and use it in GitHub Desktop.

Revisions

  1. Schniz created this gist Jul 5, 2022.
    15 changes: 15 additions & 0 deletions create.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    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;