This commit is contained in:
syuilo
2018-10-02 00:34:37 +09:00
parent 35362ed3c7
commit f56adce51f
5 changed files with 8 additions and 44 deletions

View File

@@ -3,11 +3,6 @@ import db from '../db/mongodb';
const Stats = db.get<IStats>('stats');
// 後方互換性のため
Stats.dropIndex({ date: -1 } as any).catch((e: mongo.MongoError) => {
if (e.code !== 27) throw e;
});
Stats.createIndex({ span: -1, date: -1 }, { unique: true });
export default Stats;