Repository navigation
Dhruv/members table - #12
Open
dhruvnpUNC wants to merge 5 commits into
Open
dhruvnpUNC wants to merge 5 commits into
dhruvnpUNC wants to merge 5 commits into
Conversation
…b:generate using local postgres15 server
3 tasks done
VidurShah
reviewed
Oct 22, 2026
VidurShah
left a comment
Collaborator
There was a problem hiding this comment.
Thanks Dhruv. Using citext was a good choice with a clear reason, and the screenshot shows the case-insensitive uniqueness check the ticket asked for. A few things need fixing before this merges.
Please fix
member_statusis missingalumni. The TDD 3.1 enum isactive | alumni.- Missing timestamps. TDD 3.1 needs
created_aton every table andupdated_aton editable ones.membersis editable, so add both:defaultNow(), plus.$onUpdate(() => new Date())onupdated_at. - Array columns accept NULL.
other_emails,majorsandminorsdefault to{}, but you can still insert NULL into them explicitly. Add.notNull()so code reading them can rely on always getting an array. CREATE EXTENSION citextwas added to the generated migration by hand. It has no--> statement-breakpointafter it, and Drizzle doesn't know it's there, so it can get lost the next time the migration is regenerated (which is likely, see below). Put it in its own custom migration (bunx drizzle-kit generate --custom --name enable_citext) that runs before the members migration.- Revert the
.env.examplechange. Droppingpostgres:postgresbreaks the default for anyone running outside the devcontainer.
Heads-up
- Migration clash with #11. #11 also adds a
0001_*migration. If #11 merges first, delete your generated migration files, rebase onmain, and runbun run db:generateagain. That's another reason to keep the citext extension in its own migration. - Testing environment. You mentioned
bun run db:migratefailed for you and you tested on a local Postgres 15. The devcontainer runs Postgres 16, which is what we deploy on, so let's get your devcontainer working. Ping me or post the error. - PR checklist. It's unchecked. Please run through it and tick the boxes.
Re-request review when it's ready.
Collaborator
|
Not blocking: TDD 3.1 also has a trigram search index on members. It'll come with the members list ticket. Vidur's handling the migration regeneration when this merges. |
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.
Ticket
Closes #3 Members Table
What changed
Why
The members table helps us store relevant information about club members. Having this information easily accessible will help streamline various tasks like, like inviting every member on a project to a github repository as soon as a project team is created.
How to verify
bun run db:migrate was giving me issues so I created a local postgres15 server and verified it manually. I used citext because it handles case insensitivity automatically and is native to PostgreSQL
Checklist