Problem
supabase/migrations/20260701_create_user_places.sql vs what the app assumes:
type text has no CHECK against the six valid PLACE_TYPES → a bad value makes PLACE_TYPE_LABELS[place.type] / PLACE_TYPE_COLORS[place.type] return undefined at render time (my-places-panel.tsx:153, map-view.tsx:177)
- The UPDATE policy lacks
WITH CHECK (auth.uid() = user_id) — Postgres RLS best practice; without it a row could be moved to another user_id by update
lat/lng have no range constraints (mirrors the client-side validation gap)
- Header comments still contain AI-session artifacts ("Requires dashboard/CLI access this repo's Claude session did not have...") — worth scrubbing before more forks copy this file
Same review should cover user_home and user_events.
Acceptance criteria
Problem
supabase/migrations/20260701_create_user_places.sqlvs what the app assumes:type texthas no CHECK against the six valid PLACE_TYPES → a bad value makesPLACE_TYPE_LABELS[place.type]/PLACE_TYPE_COLORS[place.type]returnundefinedat render time (my-places-panel.tsx:153,map-view.tsx:177)WITH CHECK (auth.uid() = user_id)— Postgres RLS best practice; without it a row could be moved to another user_id by updatelat/lnghave no range constraints (mirrors the client-side validation gap)Same review should cover
user_homeanduser_events.Acceptance criteria