v1.5 - history and timeline as well as many datastructure updates added, polished, fixes
This commit is contained in:
parent
1f0aa3078f
commit
1d84400aef
63 changed files with 7927 additions and 208 deletions
30
server/src/migrations/011_award_published.sql
Normal file
30
server/src/migrations/011_award_published.sql
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
-- ═══════════════════════════════════════════════════════════════
|
||||
-- 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue