feat(db): drop the unused weekends.title column - #33
Open
sdavisde wants to merge 1 commit into
Open
Conversation
Nothing has read or written `weekends.title` since labels became derived from weekend_groups.number and weekends.type. Remove the column, along with the `title` field on the Weekend domain type, the two queries still selecting it, and the literals in the seed data. The migration documents the two checks worth running against production first: that no weekend's title was hand-edited to something the derived label won't reproduce, and that every weekend is attached to a numbered group (a weekend with no group number renders as "DTTD Mens", with no number to identify it). database.types.ts was edited by hand to match — regenerate with `yarn db:generate` against a reset local database to confirm. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VCx4YdQiaFiE2Ss7TP9q3L
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second of two stacked PRs — based on #32, merge that first. The diff shown here is only this PR's changes once #32 lands.
Nothing has read or written
weekends.titlesince #32 made labels derived fromweekend_groups.numberandweekends.type. This removes the column and the last traces of it.Changes
20260812100000_drop_weekends_title.sqltitleremoved from theWeekenddomain typesupabase/seed.sqldatabase.types.tsregenerated to matchThis is the point of no return — until now the stored title has been a harmless fallback.
1. No weekend is missing a group number. A derived label depends on
weekends.group_id → weekend_groups.number, andgroup_idis nullable. An orphan row would render asDTTD Menswith no number — worse than today, where it renders whatever text is stored. This must return zero rows:2. No title was hand-customized. Any title edited directly in the DB to something the derived format won't reproduce is lost for good:
Everything should read as some variant of
DTTD#11,Mens DTTD#12, orDTTD Mens #42.Note on database.types.ts
The sandbox this was authored in has no Docker, so
yarn db:generatecouldn't run and the types file was edited by hand —titleremoved from the weekendsRow/Insert/Update. Please runyarn db:reset && yarn db:generatelocally and confirm the diff comes back empty.Verification
tsc --noEmitclean · 83 tests pass ·yarn lintclean (one pre-existing TanStack warning) ·yarn buildsucceeds.Generated by Claude Code