diff --git a/shared/models/data/v2/formation.v2.model.ts b/shared/models/data/v2/formation.v2.model.ts index 3dc515171..2fbb68ed3 100644 --- a/shared/models/data/v2/formation.v2.model.ts +++ b/shared/models/data/v2/formation.v2.model.ts @@ -2,7 +2,17 @@ import type { CreateIndexesOptions, IndexSpecification } from "mongodb"; import { z } from "zod"; import { zObjectId } from "zod-mongodb-schema"; -const indexes: [IndexSpecification, CreateIndexesOptions][] = []; +const indexes: [IndexSpecification, CreateIndexesOptions][] = [ + [ + { + cfd: 1, + rncp: 1, + organisme_formateur_id: 1, + organisme_responsable_id: 1, + }, + {}, + ], +]; const collectionName = "formationV2"; diff --git a/shared/models/data/v2/organisme.v2.model.ts b/shared/models/data/v2/organisme.v2.model.ts index f445f402b..71330725f 100644 --- a/shared/models/data/v2/organisme.v2.model.ts +++ b/shared/models/data/v2/organisme.v2.model.ts @@ -2,7 +2,15 @@ import type { CreateIndexesOptions, IndexSpecification } from "mongodb"; import { z } from "zod"; import { zObjectId } from "zod-mongodb-schema"; -const indexes: [IndexSpecification, CreateIndexesOptions][] = []; +const indexes: [IndexSpecification, CreateIndexesOptions][] = [ + [ + { + siret: 1, + uai: 1, + }, + {}, + ], +]; const collectionName = "organismeV2"; diff --git a/shared/models/data/v2/person.v2.model.ts b/shared/models/data/v2/person.v2.model.ts index 8a8d6de8e..67fcf47f5 100644 --- a/shared/models/data/v2/person.v2.model.ts +++ b/shared/models/data/v2/person.v2.model.ts @@ -2,7 +2,16 @@ import type { CreateIndexesOptions, IndexSpecification } from "mongodb"; import { z } from "zod"; import { zObjectId } from "zod-mongodb-schema"; -const indexes: [IndexSpecification, CreateIndexesOptions][] = []; +const indexes: [IndexSpecification, CreateIndexesOptions][] = [ + [ + { + date_de_naissance: 1, + nom: 1, + prenom: 1, + }, + {}, + ], +]; const collectionName = "personV2";