From 9d681840944b276cf620ad4636a8a9944f86b209 Mon Sep 17 00:00:00 2001 From: patrickwebsdev Date: Sun, 10 Nov 2024 19:41:01 -0300 Subject: [PATCH] feat: add supabase migration --- ...us_to_help_request_and_policy_for_mod_update.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 supabase/migrations/20241110223829_add_crm_status_to_help_request_and_policy_for_mod_update.sql diff --git a/supabase/migrations/20241110223829_add_crm_status_to_help_request_and_policy_for_mod_update.sql b/supabase/migrations/20241110223829_add_crm_status_to_help_request_and_policy_for_mod_update.sql new file mode 100644 index 0000000..cf02192 --- /dev/null +++ b/supabase/migrations/20241110223829_add_crm_status_to_help_request_and_policy_for_mod_update.sql @@ -0,0 +1,13 @@ +alter table "public"."help_requests" add column "crm_status" text; + +create policy "Mod update" +on "public"."help_requests" +as permissive +for update +to authenticated +using ((EXISTS ( SELECT 1 + FROM user_roles + WHERE ((user_roles.user_id = auth.uid()) AND (user_roles.role = 'moderator'::roles))))); + + +