What
Add a share_links table to Supabase with proper Row Level Security.
Schema
| Column |
Type |
Notes |
| id |
uuid |
Primary key |
| user_id |
uuid |
FK to auth.users |
| token |
uuid |
Public-facing, generated server-side |
| snapshot |
jsonb |
Frozen or live config |
| snapshot_type |
enum |
'frozen' or 'live' |
| expires_at |
timestamptz |
Nullable |
| is_active |
boolean |
Default true |
| view_count |
integer |
Default 0 |
| created_at |
timestamptz |
Default now() |
RLS Rules
- Authenticated users can INSERT/UPDATE/DELETE only their own rows (user_id = auth.uid())
- Public (anon) can SELECT only by token column — never expose user_id in response
Acceptance Criteria
What
Add a
share_linkstable to Supabase with proper Row Level Security.Schema
RLS Rules
Acceptance Criteria
/supabase/migrations/