Skip to content

Commit

Permalink
Merge pull request #398 from BaseAdresseNationale/antoineludeau/add-b…
Browse files Browse the repository at this point in the history
…an-id-index-2

Fix on ban id indexes
  • Loading branch information
antoineludeau authored Apr 30, 2024
2 parents 6a386c1 + 34cf042 commit 25b2dae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/util/mongo.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ class Mongo {
async createIndexes() {
await this.db.collection('voies').createIndex({codeCommune: 1})
await this.db.collection('voies').createIndex({idVoie: 1}, {unique: true})
await this.db.collection('voies').createIndex({banId: 1}, {unique: true})
await this.db.collection('voies').createIndex({banId: 1})
await this.db.collection('voies').createIndex({banIdDistrict: 1})
await this.db.collection('voies').createIndex({tiles: 1})
await this.db.collection('numeros').createIndex({codeCommune: 1})
await this.db.collection('numeros').createIndex({idVoie: 1})
await this.db.collection('numeros').createIndex({id: 1}, {unique: true})
await this.db.collection('numeros').createIndex({banId: 1}, {unique: true})
await this.db.collection('numeros').createIndex({banId: 1})
await this.db.collection('numeros').createIndex({banIdMainCommonToponym: 1})
await this.db.collection('numeros').createIndex({banIdSecondaryCommonToponyms: 1})
await this.db.collection('numeros').createIndex({banIdDistrict: 1})
Expand All @@ -38,7 +38,7 @@ class Mongo {
await this.db.collection('sources_communes').createIndex({source: 1, part: 1})
await this.db.collection('communes').createIndex({compositionAskedAt: 1}, {sparse: true})
await this.db.collection('communes').createIndex({codeCommune: 1}, {unique: true})
await this.db.collection('communes').createIndex({banId: 1}, {unique: true})
await this.db.collection('communes').createIndex({banId: 1})
await this.db.collection('metrics').createIndex({name: 1, date: 1}, {unique: true})
}

Expand Down

0 comments on commit 25b2dae

Please sign in to comment.