-- ═══════════════════════════════════════════════════════════════ -- EVENT SCOPES -- -- event_sections is a scope list and always was: whose gathering -- this is, not which band of a page it lands in. The name stuck -- because for three values those two things coincided. They stop -- coinciding here — local, international and other are real scopes -- that Retreats.tsx does not draw a band for. -- -- Nothing is renamed. events.section_id keeps its name and its -- foreign key, and this file only touches rows. A column rename -- would have to walk the descriptors, the shaper, the hook, the -- section prop and the view, for a word. -- -- Order is scope order, widest first, with Other last where an -- unclassified row belongs. Gaps of ten leave room to slot a scope -- in later without renumbering the ones around it. -- -- The three UPDATEs correct the existing rows' labels: "National -- Retreats" was a page heading living in a scope table, and now -- that a scope can hold a class it reads wrong in the admin's -- dropdown. Retreats.tsx owns its own band titles and never read -- these, so nothing on the public site moves. -- -- INSERT OR IGNORE rather than INSERT: if a scope was added by hand -- on the box before this shipped, re-running is a no-op instead of -- a constraint error. -- -- No BEGIN...END, so nothing after this file is dropped by the -- migration runner. -- ═══════════════════════════════════════════════════════════════ UPDATE event_sections SET name = 'National', sort_order = 10 WHERE id = 'national'; UPDATE event_sections SET name = 'Regional', sort_order = 20 WHERE id = 'regional'; UPDATE event_sections SET name = 'Partner', sort_order = 50 WHERE id = 'partner'; INSERT OR IGNORE INTO event_sections (id, name, sort_order) VALUES ('local', 'Local', 30), ('international', 'International', 40), ('other', 'Other', 60);