Upgrade mongoose 4 -> 6 for MongoDB 8.0 #12
No reviewers
Labels
No labels
bug
dependencies
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
backmeupplz/voicy-payments!12
Loading…
Reference in a new issue
No description provided.
Delete branch "mongo-8"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
voicy-db is moving from MongoDB 5.0 to 8.0. mongoose 4 bundles MongoDB driver 2.2, which sends commands as OP_QUERY; 6.0+ rejects that (
Unsupported OP_QUERY command: listCollections).mongoose 6.13 (driver 4.17.2, same as voicy) works with both 5.0 and 8.0, so this ships before the DB moves.
aggregate()pipelines are arrays (required since mongoose 5)count()→estimatedDocumentCount()for whole collections,countDocuments()for filters;remove()→deleteMany()Tested: every exported helper (
findChat,countChats,findChats,findVoices,getNewStats, which covers the duration/hourly/daily aggregates,getStats) and both/statsforashmanovcounts against a MongoDB 8.0.34 restore of production voicy-db.🤖 Generated with Claude Code