⚙ Configuration Supabase — À exécuter une seule fois dans l'éditeur SQL
-- 1. TABLE galerie_photos
CREATE TABLE IF NOT EXISTS public.galerie_photos (
id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
filename text NOT NULL,
url text NOT NULL,
ordre integer DEFAULT 0 NOT NULL,
created_at timestamptz DEFAULT now()
);
ALTER TABLE public.galerie_photos ENABLE ROW LEVEL SECURITY;
CREATE POLICY "public_read" ON public.galerie_photos FOR SELECT USING (true);
CREATE POLICY "anon_insert" ON public.galerie_photos FOR INSERT WITH CHECK (true);
CREATE POLICY "anon_update" ON public.galerie_photos FOR UPDATE USING (true);
CREATE POLICY "anon_delete" ON public.galerie_photos FOR DELETE USING (true);
-- 2. BUCKET (ou créer via Dashboard › Storage › New bucket › "galerie-sdb" › Public)
INSERT INTO storage.buckets (id, name, public)
VALUES ('galerie-sdb', 'galerie-sdb', true) ON CONFLICT DO NOTHING;
CREATE POLICY "public_read_s" ON storage.objects FOR SELECT USING (bucket_id = 'galerie-sdb');
CREATE POLICY "anon_upload_s" ON storage.objects FOR INSERT WITH CHECK (bucket_id = 'galerie-sdb');
CREATE POLICY "anon_delete_s" ON storage.objects FOR DELETE USING (bucket_id = 'galerie-sdb');
Ouvrez Supabase → SQL Editor → New query, collez ce SQL et exécutez-le.
À faire une seule fois avant d'uploader vos premières photos.
📷
Glisser-déposer ou cliquer pour ajouter des photos
JPG et PNG uniquement · Plusieurs fichiers acceptés
Photos de la galerie
0 photo
✦ Glissez les photos pour réorganiser l'ordre d'affichage