Add a Listed flag: published records reachable only by their link
is_listed (migration 027) sits beside is_published on organizations, events, people, teams and awards. Unticked, the record's own page still works, but the site's lists leave it out: the list routes, a region's chapters, an organization's events, teams and awards, the QR page's directory, and the front page's counts and countdown. Places where someone attached it by hand (rosters, hosts, billed people, recipients, timeline, a pinned countdown) still show it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3c02eb8971
commit
cd393e4ab2
7 changed files with 120 additions and 38 deletions
43
server/src/migrations/027_listed.sql
Normal file
43
server/src/migrations/027_listed.sql
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
-- ═══════════════════════════════════════════════════════════════
|
||||
-- 027 LISTED: PUBLISHED BUT ONLY BY LINK
|
||||
--
|
||||
-- is_published stays the hard gate: 0 is a draft (or, for people,
|
||||
-- private), off the site entirely and a 404 at its own URL.
|
||||
-- is_listed only means anything on a published row. 0 keeps the
|
||||
-- record's own page working but leaves it out of every list the
|
||||
-- site gathers by itself:
|
||||
--
|
||||
-- the /events, /organizations, /teams and /awards lists (and so
|
||||
-- every band, calendar, map and card grid built on them), a
|
||||
-- region's chapters, an organization's events, teams and awards,
|
||||
-- the /directory the QR page reads, and the front page's counts
|
||||
-- and next-event countdown.
|
||||
--
|
||||
-- It still appears wherever someone attached it by hand: rosters,
|
||||
-- billed people, hosts, award recipients, timeline entries, and a
|
||||
-- countdown pinned to it by name. Each of those rows has its own
|
||||
-- is_public (or is_published) to hide it there.
|
||||
--
|
||||
-- Defaults to 1, so every existing row stays listed.
|
||||
--
|
||||
-- Plain ADD COLUMN: NOT NULL with a constant default and a CHECK is
|
||||
-- allowed without a rebuild, STRICT tables included. v_events reads
|
||||
-- e.*, so it picks the column up with no change of its own.
|
||||
--
|
||||
-- PRAGMA user_version; -- reads 26 before this file
|
||||
-- ═══════════════════════════════════════════════════════════════
|
||||
|
||||
ALTER TABLE organizations ADD COLUMN is_listed INTEGER NOT NULL DEFAULT 1
|
||||
CHECK (is_listed IN (0, 1));
|
||||
|
||||
ALTER TABLE events ADD COLUMN is_listed INTEGER NOT NULL DEFAULT 1
|
||||
CHECK (is_listed IN (0, 1));
|
||||
|
||||
ALTER TABLE people ADD COLUMN is_listed INTEGER NOT NULL DEFAULT 1
|
||||
CHECK (is_listed IN (0, 1));
|
||||
|
||||
ALTER TABLE teams ADD COLUMN is_listed INTEGER NOT NULL DEFAULT 1
|
||||
CHECK (is_listed IN (0, 1));
|
||||
|
||||
ALTER TABLE awards ADD COLUMN is_listed INTEGER NOT NULL DEFAULT 1
|
||||
CHECK (is_listed IN (0, 1));
|
||||
Loading…
Add table
Add a link
Reference in a new issue