Files
Jyotisha/frontend/supabase/migrations/20260721100000_chat_sessions_delete_grant.sql
T
2026-07-21 12:15:12 +08:00

13 lines
289 B
PL/PgSQL

begin;
drop policy if exists chat_sessions_delete_own on public.chat_sessions;
create policy chat_sessions_delete_own
on public.chat_sessions
for delete
to authenticated
using ((select auth.uid()) = user_id);
grant delete on table public.chat_sessions to authenticated;
commit;