-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisable-audit-temporarily.sql
More file actions
28 lines (22 loc) · 997 Bytes
/
Copy pathdisable-audit-temporarily.sql
File metadata and controls
28 lines (22 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- Temporarily disable the audit function to get signup working
-- We'll fix the audit function properly later
-- Drop the problematic audit function temporarily
DROP FUNCTION IF EXISTS create_audit_log() CASCADE;
-- Test organization creation without audit function
DO $$
DECLARE
test_org_id UUID;
BEGIN
BEGIN
INSERT INTO public.organizations (name, slug)
VALUES ('Audit Disabled Test', 'audit-disabled-test-' || extract(epoch from now()))
RETURNING id INTO test_org_id;
RAISE NOTICE 'SUCCESS: Organization creation works without audit function! Org ID: %', test_org_id;
-- Clean up
DELETE FROM public.organizations WHERE id = test_org_id;
RAISE NOTICE 'SUCCESS: Test organization cleaned up';
EXCEPTION WHEN OTHERS THEN
RAISE NOTICE 'ERROR: Organization creation still failing: %', SQLERRM;
END;
END $$;
SELECT 'AUDIT FUNCTION TEMPORARILY DISABLED - SIGNUP SHOULD WORK NOW' as status;