Skip to content

Commit d925720

Browse files
committed
getting rid of explicit orderBy(documentId) as this doesn't play well when we have where clauses
1 parent f67c7d1 commit d925720

File tree

3 files changed

+1
-32
lines changed

3 files changed

+1
-32
lines changed

cloud/functions/src/functions/firestore/migrations/025-fillUserLastConnection.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ export async function fillUserLastConnection(): Promise<"OK"|"Error"> {
1212
const stats = await windowedProcessUsers(
1313
(maybeLastPreviousUserDoc) => match(maybeLastPreviousUserDoc)
1414
.with(P.nullish, () => db.collection('users'))
15-
.otherwise(lastPreviousUserDoc => db.collection('users').where(FieldPath.documentId(), '>', lastPreviousUserDoc.id))
16-
.orderBy(FieldPath.documentId(), 'asc'),
15+
.otherwise(lastPreviousUserDoc => db.collection('users').where(FieldPath.documentId(), '>', lastPreviousUserDoc.id)),
1716
async userDoc => {
1817
const user = userDoc.data();
1918
if(!user.userLastConnection) {

cloud/functions/src/functions/firestore/services/user-utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export async function cleanOutdatedUsers(opts: { force: boolean, dryRun: boolean
4141
.with(P.nullish,
4242
() => baseQuery
4343
).otherwise(maybeLastPreviousUserDoc => baseQuery.where(FieldPath.documentId(), '>', maybeLastPreviousUserDoc.id))
44-
.orderBy(FieldPath.documentId(), 'asc')
4544
},
4645
userDoc => deleteUserRefIncludingChildren(userDoc.ref, opts),
4746
)

cloud/functions/src/functions/http/users/createUserTotalFavs.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)