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>
15 lines
423 B
PL/PgSQL
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;
|