Validaciones mandatorias — Sección 8 — IDs concretos

This commit is contained in:
markosbenitez
2026-06-04 21:52:39 -03:00
parent d91ea6b2ff
commit b1ca0e0795
32 changed files with 1325 additions and 121 deletions

View File

@@ -0,0 +1,8 @@
-- Migration 008: fix answers_insert policy
-- Root cause: WITH CHECK con EXISTS en responses
-- bloqueaba INSERT de anon porque anon no tiene SELECT en responses.
-- El FK response_id → responses(id) ya garantiza la integridad referencial.
DROP POLICY "answers_insert" ON public.answers;
CREATE POLICY "answers_insert" ON public.answers
FOR INSERT TO anon, authenticated
WITH CHECK (true);