NGU-Web/src/lib
Zaldimmar 625329fa7c Consolidate migrations 001–023 into one baseline schema
023_schema.sql is the whole database as the 23 migrations left it:
every table in its final shape (columns added by ALTER folded into
their CREATE), its indexes, the five views, the seed rows (event
scopes, the shipped front page) and the triggers, last. The reasoning
from the old files that still applies sits next to what it explains;
the rest is in git history.

A fresh database runs it and lands at v23; one already at v23 skips
it. migrate() now treats the first file as a baseline and refuses a
database between v1 and v22 with a message saying to upgrade it on
an older release first, rather than failing halfway on CREATE TABLE.
Production is at v19, so the previous commits on this branch
(020–023) have to be deployed before this one.

Checked by building a database from the old files and one from this
file and comparing them: strictness, columns, types, defaults,
nullability, keys, foreign keys and their actions, CHECK constraints,
index definitions, view and trigger SQL, and seed rows all match.

Comments that cited migration numbers now point at the schema, and
CLAUDE.md describes the baseline and where new migrations go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 17:34:23 -05:00
..
adminSchema.ts Consolidate migrations 001–023 into one baseline schema 2026-09-26 17:34:23 -05:00
adminTitle.tsx Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
api.ts Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
auth.tsx Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
embeds.ts Replace the front page with an admin-driven home 2026-09-25 05:37:42 -05:00
eventSeries.ts Add a reusable event calendar and put it on the front page 2026-09-25 06:28:42 -05:00
eventTypes.ts Clean up the schema: drop unused tables, rename scopes, publishable awards 2026-09-26 17:09:58 -05:00
hrefs.ts Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
media.ts Replace the front page with an admin-driven home 2026-09-25 05:37:42 -05:00
roles.ts v1.5 - history and timeline as well as many datastructure updates added, polished, fixes 2026-09-25 02:38:51 -05:00
sections.tsx Revert the implicit-any typing of src/ 2026-09-26 15:32:28 -05:00
timeline.ts Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
timelineRefs.ts v1.5 - history and timeline as well as many datastructure updates added, polished, fixes 2026-09-25 02:38:51 -05:00
useContent.ts Clean up the schema: drop unused tables, rename scopes, publishable awards 2026-09-26 17:09:58 -05:00
useFrontPage.ts Add a reusable event calendar and put it on the front page 2026-09-25 06:28:42 -05:00
useHistory.ts Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
useRecord.ts Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
useResource.ts Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
version.ts v1.5 - history and timeline as well as many datastructure updates added, polished, fixes 2026-09-25 02:38:51 -05:00