nkbmusic/supabase/migrations/20261101000000_reports.sql
metatroncubeswdev ad8c4f1c6b App: speaker/Bluetooth picker, Settings & help, Privacy Policy, Terms, FAQ, song reports
- Now Playing shows where music plays and opens the phone's output switcher
- Settings hub: Wi-Fi-only downloads (default on), storage, sound, help, legal
- Privacy Policy and Terms bundled as Markdown (assets/legal), shown in-app
- 'Is this your song?' report form feeding takedown_requests (+ kind, user_id)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 12:00:16 -04:00

10 lines
513 B
SQL

-- "Is this your song? / Report a song" from the app: what kind of report, and who sent it.
alter table takedown_requests
add column kind text not null default 'takedown'
check (kind in ('claim', 'takedown', 'wrong_info', 'other')),
add column user_id uuid references auth.users on delete set null default auth.uid();
-- Signed-in users can see the reports they sent (admins already see all).
create policy own_takedowns on takedown_requests for select using (user_id = auth.uid());