Getting error when pushing local migrations to supabase.

I've created a local migration that works just fine locally, but whenever I try to push it to the remote DB, I get:

Error: ERROR: must be member of role "authenticated" (SQLSTATE 42501)


I'm creating a view that should have authenticated as owner, since I need RLS to apply to the view. The statement that generates the error is:

alter view public.my_view owner to authenticated;


Is there a workaround for this?
Was this page helpful?