codecombat/server/analytics/AnalyticsString.coffee
Matt Lott 3fd5f49220 Analytics data revamp
Add analytics per-day aggregation collection.
Add analytics strings collection.
Add per-day aggregation mongo insertion script.
Update campaign editor to use aggregation collection.
Update queries to use _id instead of created field.
2015-01-14 11:09:01 -08:00

12 lines
400 B
CoffeeScript

mongoose = require 'mongoose'
# Auto-incrementing number _id
# http://docs.mongodb.org/manual/tutorial/create-an-auto-incrementing-field/#auto-increment-optimistic-loop
# TODO: Why strict:false?
AnalyticsStringSchema = new mongoose.Schema({
_id: {type: Number}
v: {type: String}
}, {strict: false})
module.exports = AnalyticsString = mongoose.model('analytics.string', AnalyticsStringSchema)