site-web-targo/supabase/migrations/20260215014332_02acdb9e-7d21-4766-864b-5d79970e832a.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

15 lines
423 B
PL/PgSQL

-- Create a function that allows executing arbitrary SQL (service role only via edge functions)
CREATE OR REPLACE FUNCTION public.exec_sql(query text)
RETURNS void
LANGUAGE plpgsql
SECURITY DEFINER
SET search_path = public
AS $$
BEGIN
EXECUTE query;
END;
$$;
-- Add indexes_dropped column to import_jobs to track index state
ALTER TABLE public.import_jobs ADD COLUMN IF NOT EXISTS indexes_dropped boolean DEFAULT false;