add unique index on slackChannelId in BoardChannel model
This commit is contained in:
parent
1da59021a3
commit
8e5f4a2d7c
1 changed files with 2 additions and 0 deletions
|
|
@ -6,4 +6,6 @@ const boardChannelSchema = new mongoose.Schema({
|
||||||
tagSlugs: [String],
|
tagSlugs: [String],
|
||||||
}, { timestamps: true })
|
}, { timestamps: true })
|
||||||
|
|
||||||
|
boardChannelSchema.index({ slackChannelId: 1 }, { unique: true })
|
||||||
|
|
||||||
export default mongoose.models.BoardChannel || mongoose.model('BoardChannel', boardChannelSchema)
|
export default mongoose.models.BoardChannel || mongoose.model('BoardChannel', boardChannelSchema)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue