Skip to content

Commit c741a26

Browse files
committed
fix alter default privs
1 parent 2db5569 commit c741a26

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

migrations/db/migrations/00000000000000-initial-schema.sql

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,11 @@ grant authenticated to authenticator;
111111
grant service_role to authenticator;
112112
grant supabase_admin to authenticator;
113113

114+
-- These are required so that the users receive grants whenever "postgres" creates tables/function
114115
grant usage on schema public to postgres, anon, authenticated, service_role;
115-
alter default privileges in schema public grant all on tables to postgres, anon, authenticated, service_role;
116-
alter default privileges in schema public grant all on functions to postgres, anon, authenticated, service_role;
117-
alter default privileges in schema public grant all on sequences to postgres, anon, authenticated, service_role;
116+
alter default privileges for role postgres in schema public grant all on tables to postgres, anon, authenticated, service_role;
117+
alter default privileges for role postgres in schema public grant all on functions to postgres, anon, authenticated, service_role;
118+
alter default privileges for role postgres in schema public grant all on sequences to postgres, anon, authenticated, service_role;
118119

119120
-- Allow Extensions to be used in the API
120121
grant usage on schema extensions to postgres, anon, authenticated, service_role;

0 commit comments

Comments
 (0)