Skip to content

Commit

Permalink
fix: index creation
Browse files Browse the repository at this point in the history
  • Loading branch information
climba03003 committed Aug 1, 2024
1 parent f1fed84 commit 5fba38e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mongodb-controller/lib/controller/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class Controller<TSchema extends Document = Document> extends EventEmitte
this.#collection = null as never as Collection<TSchema>
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: {} }
Expand Down

0 comments on commit 5fba38e

Please sign in to comment.