← back to Ventura Corridor

db/migrations/004_headlines.sql

11 lines

-- 004_headlines.sql · primary headline (H1 / title fallback) per business
-- Surfaced on the H1 Mural page. Editorial, not analytical.

ALTER TABLE business_enrichment
  ADD COLUMN IF NOT EXISTS headline TEXT,
  ADD COLUMN IF NOT EXISTS headline_source TEXT,  -- 'h1' | 'title' | 'meta_description'
  ADD COLUMN IF NOT EXISTS headline_extracted_at TIMESTAMPTZ;

CREATE INDEX IF NOT EXISTS idx_enrichment_headline_present
  ON business_enrichment ((headline IS NOT NULL AND length(headline) > 4));