-- Team logos storage bucket
INSERT INTO storage.buckets (id, name, public)
VALUES ('team-logos', 'team-logos', true)
ON CONFLICT (id) DO NOTHING;

CREATE POLICY team_logos_public_read ON storage.objects
  FOR SELECT USING (bucket_id = 'team-logos');

CREATE POLICY team_logos_authenticated_upload ON storage.objects
  FOR INSERT TO authenticated
  WITH CHECK (bucket_id = 'team-logos');

CREATE POLICY team_logos_authenticated_update ON storage.objects
  FOR UPDATE TO authenticated
  USING (bucket_id = 'team-logos');
