SZEDERVÖLGYI CLEAN MASTER — AI STUDIO INSTRUCTIONS AUTHORITATIVE SOURCE Read ALL five manifest files linked from index.html before doing any build work. SOURCE PROJECT Bravos LIVE Supabase project ref: vcdzxndcmvtfttxbhdbc READ-ONLY SOURCE ONLY. NEVER MODIFY IT. TARGET PROJECT Supabase project ref: gnbnpxqlhfqcslqeqvsf Target URL: https://gnbnpxqlhfqcslqeqvsf.supabase.co DO NOT DEPLOY YET. TARGET CLUB Name: Szedervölgyi Teniszklub Csömör Slug: szedervolgyi-teniszklub-csomor SAFETY - Do not copy Bravos users, bookings, payments, credits, academy participants, audit data, venue payment data, or other business records. - Build structure and business logic only. - Preserve Tennis/Padel sport isolation. - Working Tennis behavior must not regress. - Padel changes must not alter Tennis behavior. - Do not expose or use secret/service_role keys. TARGETED BRAVOS ADAPTATIONS Do NOT do blind global replacement. Replace deployment club-targeting slug in: - RLS policy coach_availability_public_read_active - RLS policy user_profiles_insert_self - view booking_calendar_slots - view coach_booking_directory - view partner_finder_directory Old slug: bravos-sport-club New slug: szedervolgyi-teniszklub-csomor CRITICAL handle_new_auth_user ADAPTATION Do not carry any Bravos-specific hardcoded club UUID into the clean master. Resolve the club_id from public.clubs using slug: szedervolgyi-teniszklub-csomor Fail closed if it does not exist. LEGACY OBJECT pricing_rules_emergency_backup_20260716 is potentially a legacy backup table. Do not include it automatically. First check all function/trigger/view/policy/FK/code dependencies. DEPENDENCY ORDER 1. extensions 2. tables 3. PK / UNIQUE / CHECK constraints 4. foreign keys 5. standalone indexes only 6. helper functions 7. business RPCs 8. trigger functions 9. table triggers 10. RLS enable 11. RLS policies 12. views 13. auth.users trigger Do not recreate constraint-backed indexes separately. AUTH TRIGGER Create auth.on_auth_user_created_create_profile only after public.handle_new_auth_user() exists. DELIVERABLE Create dependency-safe clean master migration file(s) under supabase/migrations/. DO NOT DEPLOY. Final report must include: 1. migration files created 2. table count 3. function/RPC count 4. trigger count 5. RLS policy count 6. view count 7. extensions 8. Bravos hardcodes adapted 9. handle_new_auth_user club resolution 10. legacy backup table decision 11. unresolved dependencies 12. remaining Bravos UUID/slug/branding findings 13. Tennis/Padel isolation confirmation 14. LIVE Supabase modified? NEM 15. target Supabase deployed? NEM End with: READY FOR REVIEW — NOT DEPLOYED