Schema cleanup, publishable awards, event scopes, and a consolidated baseline #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Cleans up the database schema against what the code actually uses, then consolidates all migrations into one baseline file.
⚠ Deploy in two steps
Production is at v19. The branch tip replaces migrations 001–023 with a single baseline, and the runner refuses to run it over a database between v1 and v22. Deploying the tip straight onto v19 leaves the service unable to boot.
/var/lib/ngu/ngu.db.7bc71ceand restart: migrations 020–023 run and production reaches v23.625329f(the tip): v23 skips the baseline, nothing runs.Commits
8790f86Front page subnav: points the/subnav at the new home sections (#hero, #connect, #retreats, #calendar, #numbers).25e592bSchema cleanup (migrations 020–023):people_lists,people_list_members,v_chapters,v_person_affiliations, which nothing read, and the straysrc/App.tsx.save.event_sections→event_scopesandevents.section_id→scope_id. The API sendsscopes/scope_id;useEvents,EventListCardsandEventCalendartakescope. Also inserts national/regional/partner, which only the retired seed created.events.sort_order(events sort by date now) andpeople.sort_order(never read by the site). Every other sort_order stays.teamswithcreated_at/updated_atand a touch trigger, so the teams editor gets optimistic concurrency.is_publishedis on the admin form, and the award list, award page, org awards and event awards leave drafts out.foreign_key_checkbefore each commit (PRAGMA foreign_keys is a no-op inside a transaction).7bc71ceEvent order:/eventsand org events go oldest first, undated last, so the carousel's past events sit before the first upcoming one again.625329fConsolidated baseline:023_schema.sqlis the whole schema as 001–023 left it, with the rationale kept beside each table.migrate()treats the first file as the baseline and refuses v1–v22 with a clear message. New migrations start at024_.Verification
023_schema.sqlcompare identical: 85 schema objects (columns, types, defaults, keys, foreign-key actions, CHECKs, indexes, view and trigger SQL) and all seed rows. The comparator was checked to catch a deliberate one-constraint change.foreign_key_checkis clean.updated_atrefused, current accepted; event order correct.pnpm exec tscclean,pnpm buildpasses.🤖 Generated with Claude Code