From 706eaf773903613f68d403e4cdcfb4a4234f6ca5 Mon Sep 17 00:00:00 2001 From: Mike Wichers Date: Fri, 4 Sep 2026 09:12:06 -0400 Subject: [PATCH] Add nearby_units: the courtesy directory of other Continental District units --- app/store.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/app/store.py b/app/store.py index f0d96ef..c3ac782 100644 --- a/app/store.py +++ b/app/store.py @@ -96,6 +96,33 @@ CREATE TABLE IF NOT EXISTS announcements ( ); CREATE INDEX IF NOT EXISTS idx_announcements_window ON announcements(revoked_at, starts_at, ends_at); + +-- Other Scouting units in the Continental District, published as a courtesy +-- directory. This is somebody else's data: it comes from a hand-typed district +-- document and goes stale without telling us, so `verified_at` is shown to the +-- reader rather than kept as bookkeeping. Pack 73 and Troop 73 are deliberately +-- NOT rows here - the rest of this site is us. +CREATE TABLE IF NOT EXISTS nearby_units ( + id TEXT PRIMARY KEY, + unit_type TEXT NOT NULL, + unit_number TEXT NOT NULL, + serves TEXT, + chartered_org TEXT, + street TEXT, + town TEXT, + area TEXT, + meets TEXT, + notes TEXT, + link_url TEXT, + contact TEXT, + sort_order INTEGER NOT NULL DEFAULT 100, + active INTEGER NOT NULL DEFAULT 1, + source TEXT, + verified_at TEXT, + updated_at TEXT NOT NULL +); +CREATE INDEX IF NOT EXISTS idx_nearby_units_listing + ON nearby_units(active, sort_order, unit_number); """