site-web-targo/supabase/migrations/20260214153423_3c9476ad-8cfd-404c-bb18-62141cfd8cc5.sql
louispaulb 88dc3714a1 Initial deploy: gigafibre.ca website with self-hosted address search
React/Vite/shadcn-ui site for Gigafibre ISP.
Address qualification via PostgreSQL (5.2M AQ addresses, pg_trgm fuzzy search).
No Supabase dependency for address search.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:37:50 -04:00

10 lines
592 B
SQL

-- Create temp-imports bucket for caching decompressed CSVs
INSERT INTO storage.buckets (id, name, public) VALUES ('temp-imports', 'temp-imports', false);
-- Allow service_role (edge functions) full access - no user-facing RLS needed
-- The edge function uses service_role key which bypasses RLS
-- But we add policies for authenticated admin users who may need to clean up
CREATE POLICY "Admins can manage temp imports"
ON storage.objects FOR ALL
USING (bucket_id = 'temp-imports' AND auth.role() = 'authenticated')
WITH CHECK (bucket_id = 'temp-imports' AND auth.role() = 'authenticated');