From a718a2ddbbfa206e99ee02d1c9d642abfa3f113a Mon Sep 17 00:00:00 2001 From: weeihan Date: Sat, 11 Jul 2026 14:50:03 +0800 Subject: [PATCH] fix: drop write_audit_log before recreate to handle existing function with different param names --- supabase/migrations/20260711000011_phase2_triage_rca.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/supabase/migrations/20260711000011_phase2_triage_rca.sql b/supabase/migrations/20260711000011_phase2_triage_rca.sql index c532cff..d08bc16 100644 --- a/supabase/migrations/20260711000011_phase2_triage_rca.sql +++ b/supabase/migrations/20260711000011_phase2_triage_rca.sql @@ -14,6 +14,7 @@ ALTER TABLE investigations ADD COLUMN IF NOT EXISTS fishbone_categories JSONB; -- Audit log write helper — SECURITY DEFINER so callers cannot bypass RLS +DROP FUNCTION IF EXISTS public.write_audit_log CASCADE; CREATE OR REPLACE FUNCTION public.write_audit_log( p_table_name TEXT, p_record_id UUID,