@bluedot-innovation/models 7.11.0 → 7.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/models/Destination.js +14 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/models/Destination.js
CHANGED
|
@@ -22,6 +22,20 @@ const DestinationSchema = new mongoose.Schema({
|
|
|
22
22
|
|
|
23
23
|
DestinationSchema.plugin(patcher)
|
|
24
24
|
|
|
25
|
+
/*
|
|
26
|
+
This index is only used during testing to validate behaviour that relies on the index.
|
|
27
|
+
The real index is created by the script in utils/DbInitializer
|
|
28
|
+
*/
|
|
29
|
+
DestinationSchema.index(
|
|
30
|
+
{
|
|
31
|
+
projectId: 1,
|
|
32
|
+
destinationId: 1
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
unique: true,
|
|
36
|
+
name: "destinationIdUniqueWithinProject"
|
|
37
|
+
})
|
|
38
|
+
|
|
25
39
|
// optional mongoose
|
|
26
40
|
const model = (mongooseInstance) => {
|
|
27
41
|
let Destination
|
package/package.json
CHANGED