From 62ce66237a1c4ffd4baaf69e858ccc8611022c51 Mon Sep 17 00:00:00 2001 From: undefined Date: Mon, 14 Nov 2022 20:03:57 +0800 Subject: [PATCH] core: add index for record_status --- packages/hydrooj/src/model/record.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/hydrooj/src/model/record.ts b/packages/hydrooj/src/model/record.ts index 199fc88c..d9e4a582 100644 --- a/packages/hydrooj/src/model/record.ts +++ b/packages/hydrooj/src/model/record.ts @@ -239,6 +239,8 @@ export function apply(ctx: Context) { { key: { domainId: 1, contest: 1, _id: -1 }, name: 'basic' }, { key: { domainId: 1, contest: 1, uid: 1, _id: -1 }, name: 'withUser' }, { key: { domainId: 1, contest: 1, pid: 1, _id: -1 }, name: 'withProblem' }, + { key: { domainId: 1, contest: 1, pid: 1, uid: 1, _id: -1 }, name: 'withUserAndProblem' }, + { key: { domainId: 1, contest: 1, status: 1, _id: -1 }, name: 'withStatus' }, )); }