From 68f3ee13ebb508b8bec93124c13c1687b724e4d8 Mon Sep 17 00:00:00 2001 From: tr00d Date: Tue, 30 Jun 2026 14:17:14 +0200 Subject: [PATCH] chore: grant DML on channels to API roles in REST migration Tables created by the `postgres` role in the `public` schema no longer inherit INSERT/SELECT/UPDATE/DELETE for anon/authenticated/service_role under current Supabase CLI default privileges, so the Postgrest tests failed with "permission denied for table channels" (42501). Grant the privileges explicitly in the migration. --- supabase/migrations/1751173604_rest_schema.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/supabase/migrations/1751173604_rest_schema.sql b/supabase/migrations/1751173604_rest_schema.sql index 16356020..c109512a 100644 --- a/supabase/migrations/1751173604_rest_schema.sql +++ b/supabase/migrations/1751173604_rest_schema.sql @@ -9,4 +9,5 @@ create table public.channels ( ); alter table public.channels replica identity full; -alter publication supabase_realtime add table public.channels; \ No newline at end of file +alter publication supabase_realtime add table public.channels; +grant select, insert, update, delete on public.channels to anon, authenticated, service_role; \ No newline at end of file