Skip to content

Commit

Permalink
DESENG-752 Resolve local unique indexing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Baelx committed Feb 6, 2025
1 parent 7ab3330 commit 4a67c3c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 1.12.0 Feb 6, 2025
* Resolve unique index issue in local development

### 1.11.0 Jan 9, 2025
* Added external link model, service, and swagger definitions. Modified search service. [DESENG-751](https://apps.itsm.gov.bc.ca/jira/browse/DESENG-751)

Expand Down
2 changes: 1 addition & 1 deletion api/helpers/models/emailSubscribe.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const randToken = require('rand-token');

module.exports = require('../models')('EmailSubscribe', {
email: { type: String, trim: true, default: '', index: { unique: true, dropDups: true } },
email: { type: String, trim: true, default: '', index: { unique: true, sparse: true, dropDups: true } },
project: [{ type: 'ObjectId', ref: 'Project', default: null }],
confirmed: { type: Boolean, default: false },
dateSubscribed: { type: Date, default: Date.now() },
Expand Down
4 changes: 2 additions & 2 deletions api/helpers/models/user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = require('../models')('User', {
sub: { type: String, unique: true},
idirUserGuid: { type: String, unique: true},
sub: { type: String, unique: true, sparse: true},
idirUserGuid: { type: String, unique: true, sparse: true},
firstName: { type: String, trim: true, default: '' },
middleName: { type: String, trim: true, default: null },
lastName: { type: String, trim: true, default: '' },
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "landuseplanning-api",
"version": "1.11.0",
"version": "1.12.0",
"author": "Mark Lisé",
"contributors": [
"Mark Lisé <[email protected]>",
Expand Down

0 comments on commit 4a67c3c

Please sign in to comment.