Self-hosted roles: supabase_admin and postgres (and local dev supabase cli...), non-public schema
I'm hitting issues with permissions on my deployed, self-hosted database when using a non-public schema.
I created the schema with migrations like the following (referencing https://supabase.com/docs/guides/api/using-custom-schemas):
Seemingly, this works ok for my local development cases.
However, my deployed database has
Since the tables are owned by
(continued in comment)
I created the schema with migrations like the following (referencing https://supabase.com/docs/guides/api/using-custom-schemas):
Seemingly, this works ok for my local development cases.
However, my deployed database has
current_user as supabase_admin (whereas in my local dev studio, running select current_user returns postgres).Since the tables are owned by
supabase_admin in my deployed database, the ALTER DEFAULT PRIVILEGES command seems to be irrelevant (as I understand, it only grants privileges for objects created by the role that is specified, i.e. postgres).(continued in comment)