Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update v2 indexes
Browse files Browse the repository at this point in the history
Pomarom committed Nov 28, 2024
1 parent a98122c commit 63bd609
Showing 3 changed files with 30 additions and 3 deletions.
12 changes: 11 additions & 1 deletion shared/models/data/v2/formation.v2.model.ts
Original file line number Diff line number Diff line change
@@ -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";

10 changes: 9 additions & 1 deletion shared/models/data/v2/organisme.v2.model.ts
Original file line number Diff line number Diff line change
@@ -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";

11 changes: 10 additions & 1 deletion shared/models/data/v2/person.v2.model.ts
Original file line number Diff line number Diff line change
@@ -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";

0 comments on commit 63bd609

Please sign in to comment.