Skip to content

Commit

Permalink
feat: lbac 2357: add indexes (#1363)
Browse files Browse the repository at this point in the history
* feat: add index

* fix: metabase collection file classification
  • Loading branch information
kevbarns authored Jul 17, 2024
1 parent 702037b commit 50a3a3d
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/src/jobs/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { addJob, executeJob } from "./jobs_actions"
import { createApiUser } from "./lba_recruteur/api/createApiUser"
import { disableApiUser } from "./lba_recruteur/api/disableApiUser"
import { resetApiKey } from "./lba_recruteur/api/resetApiKey"
import { createRoleManagement360 } from "./lba_recruteur/createRoleManagement360"
import { annuleFormulaire } from "./lba_recruteur/formulaire/annuleFormulaire"
import { fixJobExpirationDate } from "./lba_recruteur/formulaire/fixJobExpirationDate"
import { fixJobType } from "./lba_recruteur/formulaire/fixJobType"
Expand All @@ -39,6 +38,7 @@ import updateGeoLocations from "./lbb/updateGeoLocations"
import updateLbaCompanies from "./lbb/updateLbaCompanies"
import updateOpcoCompanies from "./lbb/updateOpcoCompanies"
import { createJobsCollectionForMetabase } from "./metabase/metabaseJobsCollection"
import { createRoleManagement360 } from "./metabase/metabaseRoleManagement360"
import { runGarbageCollector } from "./misc/runGarbageCollector"
import { importHelloWork } from "./offrePartenaire/importHelloWork"
import { exportLbaJobsToS3 } from "./partenaireExport/exportJobsToS3"
Expand Down
3 changes: 3 additions & 0 deletions shared/models/applications.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ export default {
[{ company_name: 1 }, {}],
[{ company_naf: 1 }, {}],
[{ job_origin: 1 }, {}],
[{ job_id: 1 }, {}],
[{ caller: 1 }, {}],
[{ created_at: 1 }, {}],
],
collectionName,
} as const satisfies IModelDescriptor
2 changes: 1 addition & 1 deletion shared/models/appointments.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ export type IAppointmentJson = Jsonify<z.input<typeof ZAppointment>>

export default {
zod: ZAppointment,
indexes: [],
indexes: [[{ applicant_id: 1 }, {}]],
collectionName,
} as const satisfies IModelDescriptor
2 changes: 1 addition & 1 deletion shared/models/jobs.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ const ZJobs = z.any()

export default {
zod: ZJobs,
indexes: [],
indexes: [[{ jobId: 1 }, {}]],
collectionName,
} as const satisfies IModelDescriptor
2 changes: 2 additions & 0 deletions shared/models/recruiter.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ export default {
[{ establishment_siret: 1 }, {}],
[{ cfa_delegated_siret: 1 }, {}],
[{ geopoint: "2dsphere" }, {}],
[{ email: 1 }, {}],
[{ establishment_enseigne: 1 }, {}],
],
collectionName,
} as const satisfies IModelDescriptor
2 changes: 1 addition & 1 deletion shared/models/unsubscribedLbaCompany.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export type IUnsubscribedLbaCompany = z.output<typeof ZUnsubscribedLbaCompany>

export default {
zod: ZUnsubscribedLbaCompany,
indexes: [],
indexes: [[{ siret: 1 }, {}]],
collectionName,
} as const satisfies IModelDescriptor

0 comments on commit 50a3a3d

Please sign in to comment.