codecombat/server/campaigns/Campaign.coffee
Matt Lott 3d32c8a5e7 Document missing database schema indexes
These indexes are on the production database but not set in our
mongoose schemas.
2015-01-27 10:02:51 -08:00

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)