central/sql/migrations/017_add_inciweb_adapter.sql
Matt Johnson 8751264f8c feat(2-C): add NIFC InciWeb wildfire narrative adapter
InciWeb adapter for RSS-based wildfire narrative updates:
- Parse DMS coordinates from description text
- Extract state name and map to 2-letter code
- Strip HTML tags and decode entities
- Bbox filtering for regional focus
- Dedup via published_ids table (14-day sweep)
- Category: fire.narrative.inciweb
- Subject: central.fire.narrative.inciweb.<state>

Includes migration 017 and 15 unit tests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-19 03:19:25 +00:00

19 lines
498 B
SQL

-- Migration: 017_add_inciweb_adapter
-- Add InciWeb adapter to config.adapters
-- Idempotent: uses ON CONFLICT DO NOTHING
INSERT INTO config.adapters (name, enabled, cadence_s, settings)
VALUES (
'inciweb',
false, -- Ships disabled; operator enables via GUI
600,
jsonb_build_object(
'region', jsonb_build_object(
'north', 49.0,
'south', 31.0,
'east', -102.0,
'west', -124.0
)
)
)
ON CONFLICT (name) DO NOTHING;