From fb8dbdda3ec523275a24c196afa7c84f487c3352 Mon Sep 17 00:00:00 2001 From: Josh Creek <8179928+jcreek@users.noreply.github.com> Date: Sat, 10 Jan 2026 13:26:09 +0000 Subject: [PATCH] fix(*): Fix migration issue --- .../20260110114000_fix_catch_records_unique_constraint.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supabase/migrations/20260110114000_fix_catch_records_unique_constraint.sql b/supabase/migrations/20260110114000_fix_catch_records_unique_constraint.sql index 0da0a1f..4317efd 100644 --- a/supabase/migrations/20260110114000_fix_catch_records_unique_constraint.sql +++ b/supabase/migrations/20260110114000_fix_catch_records_unique_constraint.sql @@ -198,10 +198,10 @@ CREATE POLICY "Users can update own catch records" ON public.catch_records ) ) WITH CHECK ( - auth.uid() = new."userId" AND + auth.uid() = public.catch_records."userId" AND EXISTS ( SELECT 1 FROM public.pokedexes - WHERE public.pokedexes.id = new."pokedexId" + WHERE public.pokedexes.id = public.catch_records."pokedexId" AND public.pokedexes."userId" = auth.uid() ) );