@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 CHANGED
@@ -1,3 +1,6 @@
1
+ ## 7.11.1
2
+ - Added unique index to Destination model for Config API testing
3
+
1
4
  ## 7.11.0
2
5
  - Added Destination model
3
6
 
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "7.11.0",
3
+ "version": "7.11.1",
4
4
  "main": "Models.js",
5
5
  "scripts": {
6
6
  "lint": "./node_modules/.bin/eslint -c .eslintrc.js ./models/*.js ./__tests__/**/*.js ./__tests__/**/**/*.js ./schemas/*.js",