fix(supabase): remove invalid public.partners reference in migration
All checks were successful
Staging Build / build (push) Successful in 2m39s

This commit is contained in:
DanielS
2026-07-06 22:57:18 +02:00
parent 73b6d19703
commit 3a73083494
4 changed files with 62 additions and 6 deletions

View File

@@ -73,18 +73,12 @@ CREATE POLICY "Admin write settings" ON public.settings FOR ALL
-- ═══════════════════════════════════════════════════════════════════════════════
DROP POLICY IF EXISTS "Service role kann alles Unternehmen" ON public.companies;
DROP POLICY IF EXISTS "Service role kann alles Partner" ON public.partners;
-- Admin-only write access for companies
CREATE POLICY "Admin manage companies" ON public.companies FOR ALL
USING ((SELECT role FROM public.users WHERE id = auth.uid()) = 'admin')
WITH CHECK ((SELECT role FROM public.users WHERE id = auth.uid()) = 'admin');
-- Admin-only write access for partners
CREATE POLICY "Admin manage partners" ON public.partners FOR ALL
USING ((SELECT role FROM public.users WHERE id = auth.uid()) = 'admin')
WITH CHECK ((SELECT role FROM public.users WHERE id = auth.uid()) = 'admin');
-- ═══════════════════════════════════════════════════════════════════════════════
-- 6. Orders: Add INSERT policy with company_id check
-- ═══════════════════════════════════════════════════════════════════════════════