From da8942a457ba27e63d9fb26901bbdd85fbbae29e Mon Sep 17 00:00:00 2001 From: Matt Johnson Date: Sat, 16 May 2026 18:50:05 +0000 Subject: [PATCH] schema: migrate NWS settings from states to region bbox - Remove states array from NWS settings - Add region bbox covering ID/OR/WA/MT/WY/UT/NV - Bbox: north=49.5, south=31.0, east=-102.0, west=-124.5 Co-Authored-By: Claude Opus 4.5 --- sql/migrations/004_nws_states_to_bbox.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sql/migrations/004_nws_states_to_bbox.sql diff --git a/sql/migrations/004_nws_states_to_bbox.sql b/sql/migrations/004_nws_states_to_bbox.sql new file mode 100644 index 0000000..5294a87 --- /dev/null +++ b/sql/migrations/004_nws_states_to_bbox.sql @@ -0,0 +1,11 @@ +-- Migration: 004_nws_states_to_bbox +-- Converts NWS adapter settings from states list to region bbox. +-- Bbox covers ID/OR/WA/MT/WY/UT/NV with buffer. + +UPDATE config.adapters +SET settings = jsonb_set( + settings - 'states', -- Remove states key + '{region}', + '{"north": 49.5, "south": 31.0, "east": -102.0, "west": -124.5}'::jsonb +) +WHERE name = 'nws';