Add nearby_units: the courtesy directory of other Continental District units
This commit is contained in:
@@ -96,6 +96,33 @@ CREATE TABLE IF NOT EXISTS announcements (
|
|||||||
);
|
);
|
||||||
CREATE INDEX IF NOT EXISTS idx_announcements_window
|
CREATE INDEX IF NOT EXISTS idx_announcements_window
|
||||||
ON announcements(revoked_at, starts_at, ends_at);
|
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);
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user