From 5fba38e085d470ff20e8fb788a3bf25c27e9fc5b Mon Sep 17 00:00:00 2001 From: KaKa Date: Thu, 1 Aug 2024 18:16:08 +0800 Subject: [PATCH] fix: index creation --- packages/mongodb-controller/lib/controller/default.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mongodb-controller/lib/controller/default.ts b/packages/mongodb-controller/lib/controller/default.ts index 59b91af4..e7b96605 100644 --- a/packages/mongodb-controller/lib/controller/default.ts +++ b/packages/mongodb-controller/lib/controller/default.ts @@ -68,7 +68,7 @@ export class Controller extends EventEmitte this.#collection = null as never as Collection this.collection = collection this.#indexes = [] - this.#indexes.push([{ id: 1 }, { background: false, unique: true }]) + this.#indexes.push([{ uid: 1 }, { background: false, unique: true }]) this.#indexes.push(...(options?.indexes ?? [])) this.#fields = [] this.schema = options?.schema ?? { type: 'object', properties: {} }