chore: Add is_alumni attribute to Member object#160
Open
AnandajithS wants to merge 2 commits intoamfoss:developfrom
Open
chore: Add is_alumni attribute to Member object#160AnandajithS wants to merge 2 commits intoamfoss:developfrom
AnandajithS wants to merge 2 commits intoamfoss:developfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds alumni tracking functionality to the Member model by introducing an is_alumni boolean attribute and creating a database view to filter active members.
- Added
is_alumniboolean field to the Member model with a default value offalse - Created
active_membersdatabase view that filters out alumni (whereis_alumni = false) - Updated all member-related queries to use the
active_membersview instead of querying theMembertable directly
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| migrations/20251103160042_add_alumni_attribute.sql | Adds the is_alumni column to the Member table and creates the active_members view |
| src/models/member.rs | Adds is_alumni field to Member struct and UpdateMemberInput struct |
| src/graphql/mutations/member_mutations.rs | Updates INSERT and UPDATE queries to include the is_alumni field |
| src/graphql/queries/member_queries.rs | Updates member queries to use active_members view instead of Member table |
| src/graphql/mutations/status_mutations.rs | Updates status mutation query to use active_members view |
| src/daily_task/mod.rs | Updates daily task query to use active_members view |
| src/database_seeder/seed.sql | Updates seed data to include is_alumni values (alternating true/false pattern) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This PR introduce the 'is_alumni' attribute to the 'Member' object to keep track of members who have graduated
Added a view called
active_memberswhich filters out alumni by selecting rows where 'is_alumni' is set to falseUpdated the queries accordingly to make use of `active_members'
Closes #155