Move PendingPVs DAO to Mongoose - #85
Open
AustinSMueller wants to merge 1 commit into
Open
Conversation
#276 Bundle Size — 12.87MiB (+100%).Warning Bundle contains 54 duplicate packages – View duplicate packages Bundle metrics
|
| Current #276 |
Baseline | |
|---|---|---|
877.16KiB |
- |
|
0B |
- |
|
0% |
- |
|
74 |
- |
|
117 |
- |
|
9159 |
- |
|
0 |
- |
|
0% |
- |
|
320 |
- |
|
53 |
- |
Bundle size by type no changes
| Current #276 |
Baseline | |
|---|---|---|
10.35MiB (+100%) |
- | |
1.72MiB (+100%) |
- | |
805.07KiB (+100%) |
- | |
18KiB (+100%) |
- |
Bundle analysis report Branch mongoose-pendingpvs Project dashboard
Generated by RelativeCI Documentation Report issue
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the PendingPVs data-access layer from Prisma to the existing Mongoose-based DAO infrastructure, aligning pending PV operations with the ongoing Prisma→DocumentDB/Mongoose transition in the backend.
Changes:
- Added a new Mongoose model for the
pendingPvscollection. - Refactored
PendingPVDAOto extendMongooseGenericDAOand use the new Mongoose model forfindBySubmissionIDandinsertOne. - Added Jest unit tests covering DAO behavior and ID mapping, and removed an unused DB constant import from the GraphQL router.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/backend/test/dao/dao.pendingPV.test.js | Adds unit tests validating the new Mongoose-backed PendingPV DAO behavior (querying, inserting, and id/_id mapping). |
| apps/backend/routers/graphql-router.js | Removes unused PENDING_PVS_COLLECTION import now that pending PVs are not wired via a MongoDBCollection here. |
| apps/backend/mongoose/models/pending-pv.js | Introduces the Mongoose schema/model for pending PV documents (string _id, submissionID index, createdAt/updatedAt fields). |
| apps/backend/dao/pendingPV.js | Migrates PendingPV DAO implementation from Prisma to MongooseGenericDAO using the new PendingPV Mongoose model. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AustinSMueller
marked this pull request as ready for review
July 23, 2026 21:22
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.
No description provided.