-- ═══════════════════════════════════════════════════════════════ -- 011 AWARDS CAN BE DRAFTED -- -- awards was written when an award was a line on a person's -- record: created, named, done. Now each one has a URL, and -- there is no way to add a row without it being live the moment -- it saves. -- -- Plain ADD COLUMN, no rebuild. DEFAULT 1 because every award -- that exists today is already public and backfilling the other -- way round would take the lot offline. -- -- After this: -- · add bool("is_published") to the awards descriptor in -- admin-schema.js, and the matching checkbox in adminSchema.js -- (PUBLISH_FIELDS covers both it and sort_order) -- · add AND a.is_published = 1 to the three award queries in -- content.js — the /awards list, /awards/:id, and the -- recipient_count subquery in attachAwards -- -- PRAGMA user_version; -- was 7 before this file -- ═══════════════════════════════════════════════════════════════ ALTER TABLE awards ADD COLUMN is_published INTEGER NOT NULL DEFAULT 1 CHECK (is_published IN (0, 1)); CREATE INDEX awards_published_idx ON awards (is_published, sort_order); PRAGMA user_version = 11; -- ← set to this migration's number