mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-25 00:28:31 -05:00
3d32c8a5e7
These indexes are on the production database but not set in our mongoose schemas.
12 lines
475 B
CoffeeScript
12 lines
475 B
CoffeeScript
mongoose = require 'mongoose'
|
|
plugins = require '../plugins/plugins'
|
|
|
|
CampaignSchema = new mongoose.Schema(body: String, {strict: false})
|
|
|
|
CampaignSchema.index({i18nCoverage: 1}, {name: 'translation coverage index', sparse: true})
|
|
CampaignSchema.index({slug: 1}, {name: 'slug index', sparse: true, unique: true})
|
|
|
|
CampaignSchema.plugin(plugins.NamedPlugin)
|
|
CampaignSchema.plugin(plugins.TranslationCoveragePlugin)
|
|
|
|
module.exports = mongoose.model('campaign', CampaignSchema)
|