Upgrade mongoose 4 -> 6 for MongoDB 8.0 #12

Merged
backmeupplz merged 1 commit from mongo-8 into master 2026-10-22 19:48:01 +00:00
backmeupplz commented 2026-10-22 19:47:44 +00:00 (Migrated from github.com)

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 /statsforashmanov counts against a MongoDB 8.0.34 restore of production voicy-db.

🤖 Generated with Claude Code

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 `/statsforashmanov` counts against a MongoDB 8.0.34 restore of production voicy-db. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
backmeupplz/voicy-payments!12
No description provided.