From d1279752902e35f202aa25b4e4b4eede28e44684 Mon Sep 17 00:00:00 2001 From: 732642856 <732642856@qq.com> Date: Sat, 18 Jul 2026 13:03:23 +0800 Subject: [PATCH] fix: grant service role profile upserts --- ...00_profiles_service_role_upsert_grants.sql | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 frontend/supabase/migrations/20260718020000_profiles_service_role_upsert_grants.sql diff --git a/frontend/supabase/migrations/20260718020000_profiles_service_role_upsert_grants.sql b/frontend/supabase/migrations/20260718020000_profiles_service_role_upsert_grants.sql new file mode 100644 index 00000000..3e44d20b --- /dev/null +++ b/frontend/supabase/migrations/20260718020000_profiles_service_role_upsert_grants.sql @@ -0,0 +1,53 @@ +begin; + +grant select, insert, update on table public.profiles to service_role; + +grant select ( + id, + email, + credits, + created_at, + updated_at, + name, + birth_date, + birth_time, + country_code, + province_code, + city_code, + district_code, + latitude, + longitude, + timezone_offset +) on public.profiles to service_role; + +grant insert ( + id, + email, + name, + birth_date, + birth_time, + country_code, + province_code, + city_code, + district_code, + latitude, + longitude, + timezone_offset, + updated_at +) on public.profiles to service_role; + +grant update ( + name, + birth_date, + birth_time, + country_code, + province_code, + city_code, + district_code, + latitude, + longitude, + timezone_offset, + updated_at +) on public.profiles to service_role; + +commit;