central/sql/migrations
Ubuntu 8601a19f60 feat(schema): add adapter column to events, drop source
Replaces module-path-based source column (e.g. "central/adapters/nws")
with stable adapter identifier (e.g. "nws") that foreign-keys to
config.adapters.name.

Migration 011:
- ADD COLUMN adapter TEXT
- Backfill via REPLACE(source, 'central/adapters/', '')
- SET NOT NULL + FK RESTRICT
- CREATE INDEX (adapter, received DESC) for dashboard queries
- DROP COLUMN source

Code changes:
- Event model: source field renamed to adapter
- All adapters: use adapter="name" instead of source="central/adapters/name"
- Archive: write adapter column instead of source

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-17 16:09:59 +00:00
..
001_create_config_schema.sql chore: normalize line endings to LF 2026-05-16 22:26:12 +00:00
002_add_updated_at_trigger_and_index.sql feat(db): add migration 002 for updated_at trigger and enabled index 2026-05-16 01:36:30 +00:00
003_add_streams_table.sql chore: normalize line endings to LF 2026-05-16 22:26:12 +00:00
004_nws_states_to_bbox.sql chore: normalize line endings to LF 2026-05-16 22:26:12 +00:00
005_add_firms_adapter.sql feat(schema): add FIRMS adapter and CENTRAL_FIRE stream 2026-05-16 19:58:20 +00:00
006_add_usgs_quake_adapter.sql feat(schema): add USGS quake adapter and CENTRAL_QUAKE stream 2026-05-16 20:51:28 +00:00
007_add_config_system.sql feat(gui): add auth core, setup gate, and first-run operator creation 2026-05-17 05:30:49 +00:00
008_add_operators.sql feat(gui): add auth core, setup gate, and first-run operator creation 2026-05-17 05:30:49 +00:00
009_add_sessions.sql feat(gui): add auth core, setup gate, and first-run operator creation 2026-05-17 05:30:49 +00:00
010_add_audit_log.sql feat(gui): add auth core, setup gate, and first-run operator creation 2026-05-17 05:30:49 +00:00
011_events_add_adapter_column.sql feat(schema): add adapter column to events, drop source 2026-05-17 16:09:59 +00:00