سامانه صدور فاکتور و حسابداری
test: clean tenant audit rows before fixture teardown
davoodmehraban89 committed
Nov 17, 2026 at 09:23 UTC
0ccac561a7dcc1398fdf229f99b41003b914352f
1 file changed
+1
-1
scripts/wp2-auth-tenant-e2e.mjs
+1
-1
@@ -94,6 +94,6 @@ try {
94
} finally {
95
if (users.length) {
96
const ids = users.map(x => `'${x}'`).join(',');
97
- sql(`delete from public.organizations where owner_user_id in (${ids}); delete from auth.users where id in (${ids});`);
97
+ sql(`delete from public.organization_audit where organization_id in (select id from public.organizations where owner_user_id in (${ids})); delete from public.organizations where owner_user_id in (${ids}); delete from auth.users where id in (${ids});`);
98
}
99
}