Skip to content

Updated the Rankings and Submission Schemas - #28

Merged
CharlieSuarezRobles merged 3 commits into
mainfrom
feature/schema-update
Dec 1, 2026
Merged

CharlieSuarezRobles merged 3 commits into
mainfrom
feature/schema-update

Conversation

@CharlieSuarezRobles

@CharlieSuarezRobles CharlieSuarezRobles commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Changes

Updated the rankings, the submission, and the team models.

Rankings:
Made it have a source field to indicate if the ranking was created due to a submission being approved or the admin changing the points of a team. Also made it have a submission field as it was required to display the photos and the title of a corresponding ranking's submission.

Submission:
Made it have a tags field for the tags that appear in the photos, a pvpHandling field to store whether or not the user decided to assign PVP points to a team, and reviewedAt to sort the rankings in the history page in the order in which they were reviewed.

Team:
Added a isPVP field and added rules to make it be unique in the database to identify the PVP team not by name but rather by flag. This impacts the way the ranks, admin, and submission form pages identify the PVP team.

Also updated the data.ts file to match the new schema form including its types and its objects.

Deleted the 4 previous scripts and created a new script called seed.ts which populates the entiry database, respecting the dependency order that the 4 populated models have.

@CharlieSuarezRobles

Copy link
Copy Markdown
Collaborator Author

These schema changes are intended to support submission-driven ranking history and manual admin point adjustments. A ranking stores the ordered team placements and may have no associated submission when it comes from a manual adjustment. When an approval or manual point change alters team placement, we plan to record a new ranking; otherwise, we won’t create one.
Please review whether the schema supports these cases, including whether the optional submission reference and ranking data shape are appropriate, and flag any missing fields. If it looks good for these use cases, please approve; if you see a gap, please leave a comment or request changes.

@wasiddiqui-glitch wasiddiqui-glitch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good!

@thyndoan thyndoan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that, I think everything looks great!

Comment thread backend/src/models/Rankings.ts Resolved
…model dependency order and modified the schemas
Comment thread backend/src/scripts/seed.ts Resolved
Comment thread backend/src/scripts/seed.ts Resolved

@wasiddiqui-glitch wasiddiqui-glitch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think after the previous fix, everything looks good!

@thyndoan thyndoan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for all the updates. I check and it looks good!

@CharlieSuarezRobles
CharlieSuarezRobles merged commit 2bbb875 into main Dec 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants