use collation for case-insensitive comparisons

This commit is contained in:
Thomas Ruoff
2020-08-22 00:06:52 +02:00
parent 826ea43363
commit 0bcf50fa14

View File

@@ -8,7 +8,7 @@ const BookerSchema = new mongoose.Schema(
zip: { type: String, required: true }, zip: { type: String, required: true },
city: { type: String, required: true }, city: { type: String, required: true },
}, },
{ timestamps: true } { timestamps: true, collation: { locale: 'de', strength: 1 } }
) )
export default mongoose.models.Booker || mongoose.model('Booker', BookerSchema) export default mongoose.models.Booker || mongoose.model('Booker', BookerSchema)