mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 18:15:52 -05:00
c5977c00fe
We’ll remove the old long fields after we’ve got enough data to switch over our analytics queries without complication.
16 lines
599 B
CoffeeScript
16 lines
599 B
CoffeeScript
mongoose = require 'mongoose'
|
|
plugins = require '../plugins/plugins'
|
|
|
|
AnalyticsLogEventSchema = new mongoose.Schema({
|
|
u: mongoose.Schema.Types.ObjectId
|
|
e: Number # event analytics.string ID
|
|
p: mongoose.Schema.Types.Mixed
|
|
|
|
# TODO: Remove these legacy properties after we stop querying for them (probably 30 days, ~2/16/15)
|
|
user: mongoose.Schema.Types.ObjectId
|
|
event: String
|
|
properties: mongoose.Schema.Types.Mixed
|
|
}, {strict: false})
|
|
AnalyticsLogEventSchema.index({event: 1, _id: 1})
|
|
|
|
module.exports = AnalyticsLogEvent = mongoose.model('analytics.log.event', AnalyticsLogEventSchema)
|