سامانه صدور فاکتور و حسابداری

test(phase1a): flush deferred events before ALTER TABLE during rollback exercise

davoodmehraban89 committed Oct 16, 2026 at 14:26 UTC 95c14921c853f754b4a3abb6635ef8a9077691f2
1 file changed +2
supabase/tests/phase1a_rollback_up_down_up.sql
+2
@@ -23,6 +23,8 @@ BEGIN
23 RAISE EXCEPTION 'FINORA_ROLLBACK_PRECONDITION_VERSION_2_FAILED';
24 END IF;
25 END $before$;
26 +-- Flush all deferred constraint trigger events before changing table constraints.
27 +SET CONSTRAINTS ALL IMMEDIATE;
28 -- DOWN: remove phase1A-specific guards, functions and indexes; leave data.
29 DROP TRIGGER IF EXISTS trg_finora_phase1a_posted_balance ON public.records;
30 DROP TRIGGER IF EXISTS trg_finora_phase1a_guard_children ON public.records;