feat(persistence): v19 schema — fire enrichment columns

Add nullable fire_cause, unique_fire_id, geocoder_city columns to the
fires table (additive migration, no backfill) and bump SCHEMA_VERSION
18 -> 19. Validated in production on CT 108 (schema_meta.version=19,
clean run); commits the finished fire-spam/danger-zones migration that
was live but uncommitted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt Johnson 2026-07-02 14:43:24 +00:00
commit d34f664b44
2 changed files with 7 additions and 1 deletions

View file

@ -30,7 +30,7 @@ logger = logging.getLogger(__name__)
DEFAULT_DB_PATH = "/data/meshai.sqlite"
MESHAI_DB_PATH_ENV = "MESHAI_DB_PATH"
SCHEMA_VERSION = 18
SCHEMA_VERSION = 19
SCHEMA_META_TABLE = "schema_meta"
MIGRATIONS_DIR = Path(__file__).parent / "migrations"

View file

@ -0,0 +1,6 @@
-- v19: fire_cause, unique_fire_id, geocoder_city columns for fire-alert enrichment.
-- Nullable TEXT, no index, no backfill.
ALTER TABLE fires ADD COLUMN fire_cause TEXT;
ALTER TABLE fires ADD COLUMN unique_fire_id TEXT;
ALTER TABLE fires ADD COLUMN geocoder_city TEXT;