Skip to content

Upgrade mongoose to v6.xΒ #147

@sherryhli

Description

@sherryhli

Context:

  • M0 clusters in Atlas may eventually be forced to upgrade to MongoDB v5.x (currently on v4.4.x)
  • Currently starter code uses Mongoose v5.x which uses MongoDB Node.js driver v3.x under the hood. v3.x drivers are not compatible with MongoDB v5.x
  • The solution is to upgrade to Mongoose v6.x, which uses MongoDB Node.js driver v4.x

Acceptance Criteria:

  • Carefully follow the Mongoose v6 migration guide to upgrade our version of Mongoose, ensure that all breaking changes are handled
  • Ensure that UserService and EntityService functions correctly when using the MongoDB implementation

Dev Notes:

  • MongoDB Node.js driver compatibility: https://docs.mongodb.com/drivers/node/current/compatibility/
  • Files to pay attention to:
    • backend/typescript/models/index.ts
    • backend/typescript/models/user.mgmodel.ts
    • backend/typescript/models/entity.mgmodel.ts
    • backend/typescript/services/implementations/EntityServiceMg.ts
    • backend/typescript/services/implementations/userService.ts

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions