forked from odota/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
db.js
66 lines (65 loc) · 1002 Bytes
/
db.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
var config = require('./config');
var db = require('monk')(config.MONGO_URL);
db.players = db.get('players');
db.matches = db.get('matches');
db.ratings = db.get('ratings');
db.matches.index({
'players.account_id': 1,
'match_id': -1
});
/*
db.matches.index({
'players.hero_id': 1
});
*/
/*
db.matches.index({
'parsed_data.players.steam_id': 1
});
*/
db.matches.index({
'parsed_data.version': 1
});
db.matches.index({
'match_id': -1
}, {
unique: true
});
/*
db.matches.index({
'match_seq_num': -1
}, {
unique: true
});
*/
/*
db.matches.index({
'start_time': -1,
'parse_status': 1
});
*/
/*
db.matches.index({
'leagueid': 1,
'match_id': -1
});
*/
db.players.index('account_id', {
unique: true
});
db.players.index({
'ratings': 1
});
db.players.index({
'cheese': -1
});
db.players.index({
'last_visited': -1
});
db.players.index({
'full_history_time': 1
});
db.players.index({
'last_summaries_update': 1
});
module.exports = db;