1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-30 07:48:57 +09:00

Better index

This commit is contained in:
syuilo 2018-11-02 12:08:28 +09:00
parent 80b5fda292
commit 2e9bbf389e
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -1,7 +1,8 @@
import db from '../db/mongodb';
const Emoji = db.get<IEmoji>('emoji');
Emoji.createIndex('name');
Emoji.createIndex('host');
Emoji.createIndex(['name', 'host'], { unique: true });
export default Emoji;