diff --git a/common/models/challenge.json b/common/models/challenge.json index 3258d641ee..baa78a4e4c 100644 --- a/common/models/challenge.json +++ b/common/models/challenge.json @@ -6,7 +6,12 @@ "properties": { "name": { "type": "string", - "unique": true + "index": { + "mongodb": { + "unique": true, + "background": true + } + } }, "title": { "type": "string" diff --git a/common/models/nonprofit.json b/common/models/nonprofit.json index 738c43e9ad..5d8dddbc3d 100644 --- a/common/models/nonprofit.json +++ b/common/models/nonprofit.json @@ -6,7 +6,12 @@ "properties": { "name": { "type": "string", - "unique": true + "index": { + "mongodb": { + "unique": true, + "background": true + } + } }, "whatDoesNonprofitDo": { "type": "string" diff --git a/common/models/story.json b/common/models/story.json index 8aab09964b..6f252cefb3 100644 --- a/common/models/story.json +++ b/common/models/story.json @@ -6,28 +6,29 @@ "properties": { "name": { "type": "string", - "unique": true + "index": { + "mongodb": { + "unique": true, + "background": true + } + } }, "headline": { - "type": "string", - "unique": false + "type": "string" }, "timePosted": { "type": "number", "default": 0 }, "link": { - "type": "string", - "unique": false + "type": "string" }, "metaDescription": { "type": "string", - "default": "", - "unique": false + "default": "" }, "description": { - "type": "string", - "unique": false + "type": "string" }, "originalStoryAuthorEmail": { "type": "string", diff --git a/common/models/user.json b/common/models/user.json index 97027fd50e..871cd2db46 100644 --- a/common/models/user.json +++ b/common/models/user.json @@ -10,6 +10,7 @@ "index": { "mongodb": { "unique": true, + "background": true, "sparse": true } } @@ -46,7 +47,8 @@ "require": true, "index": { "mongodb": { - "unique": true + "unique": true, + "background": true } } },