Files
Jyotisha/frontend/supabase/migrations/20260718070000_profiles_service_role_upsert_id.sql
T
2026-07-18 21:32:42 +08:00

10 lines
348 B
PL/PgSQL

begin;
-- PostgREST upsert on an existing profile updates the conflict key column
-- even when the submitted id is unchanged. Keep this grant scoped to id so
-- the service role can perform current /api/account upserts without restoring
-- table-wide profile update privileges.
grant update (id) on table public.profiles to service_role;
commit;