Skip to content

Commit

Permalink
fix: use new syntax for stat
Browse files Browse the repository at this point in the history
  • Loading branch information
jamil314 committed Nov 28, 2024
1 parent 812abd7 commit c8ef154
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const up = async (db: Db, client: MongoClient) => {
await session.withTransaction(async () => {
console.log('Checking if mobile field already have indices')
const indexes = Object.keys(
(await db.collection('users').stats()).indexSizes
(await db.command({ collStats: 'users' })).indexSizes
)
const mobileHasIndex = indexes.some(
(index) => index.split('_')[0] === ('mobile' as const)
Expand Down

0 comments on commit c8ef154

Please sign in to comment.