UBER-1198: Upgrade to mongo 7 (#4472)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-01-30 14:47:54 +07:00
committed by GitHub
parent 54f167805e
commit 6996945e48
26 changed files with 197 additions and 1115 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
version: "3"
services:
mongodb:
image: mongo
image: 'mongo:7-jammy'
container_name: mongodb
environment:
- PUID=1000
+1 -1
View File
@@ -121,7 +121,7 @@
"got": "^11.8.3",
"libphonenumber-js": "^1.9.46",
"mime-types": "~2.1.34",
"mongodb": "^4.11.0",
"mongodb": "^6.3.0",
"ws": "^8.10.0",
"xml2js": "~0.4.23"
}
+6 -6
View File
@@ -566,8 +566,8 @@ export async function fixSkills (
tag: t._id
})) as TagReference[]
const ids = references.map((r) => r._id)
await db.collection(DOMAIN_TAGS).deleteMany({ _id: { $in: ids } })
await db.collection(DOMAIN_TAGS).deleteOne({ _id: t._id })
await db.collection<Doc>(DOMAIN_TAGS).deleteMany({ _id: { $in: ids } })
await db.collection<Doc>(DOMAIN_TAGS).deleteOne({ _id: t._id })
}
}
await fixCount()
@@ -588,8 +588,8 @@ export async function fixSkills (
tag: t._id
})) as TagReference[]
const ids = references.map((r) => r._id)
await db.collection(DOMAIN_TAGS).deleteMany({ _id: { $in: ids } })
await db.collection(DOMAIN_TAGS).deleteOne({ _id: t._id })
await db.collection<Doc>(DOMAIN_TAGS).deleteMany({ _id: { $in: ids } })
await db.collection<Doc>(DOMAIN_TAGS).deleteOne({ _id: t._id })
}
console.log('DONE 6 STEP')
}
@@ -610,8 +610,8 @@ export async function fixSkills (
tag: t._id
})) as TagReference[]
const ids = references.map((r) => r._id)
await db.collection(DOMAIN_TAGS).deleteMany({ _id: { $in: ids } })
await db.collection(DOMAIN_TAGS).deleteOne({ _id: t._id })
await db.collection<Doc>(DOMAIN_TAGS).deleteMany({ _id: { $in: ids } })
await db.collection<Doc>(DOMAIN_TAGS).deleteOne({ _id: t._id })
}
}
await fixCount()