This commit is contained in:
syuilo 2018-03-28 13:20:19 +09:00
parent 00e4ad08dd
commit b25a590ba9
2 changed files with 20 additions and 1 deletions

View file

@ -1,3 +1,13 @@
import * as mongo from 'mongodb';
import db from '../../db/mongodb';
export default db.get('mute') as any; // fuck type definition
const Mute = db.get<IMute>('mute');
export default Mute;
export interface IMute {
_id: mongo.ObjectID;
createdAt: Date;
deletedAt: Date;
muterId: mongo.ObjectID;
muteeId: mongo.ObjectID;
}

View file

@ -101,3 +101,12 @@ db.messagingMessages.update({}, {
}
}, false, true);
db.mute.update({}, {
$rename: {
created_at: 'createdAt',
deleted_at: 'deletedAt',
mutee_id: 'muteeId',
muter_id: 'muterId',
}
}, false, true);