From c78945436e39121f46e083eac7a6572ca2efe2d2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 9 Jun 2018 04:14:26 +0900 Subject: #1686 --- src/models/note.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/models') diff --git a/src/models/note.ts b/src/models/note.ts index ad8c1565f0..d4681b7b70 100644 --- a/src/models/note.ts +++ b/src/models/note.ts @@ -16,6 +16,9 @@ import Following from './following'; const Note = db.get('notes'); Note.createIndex('uri', { sparse: true, unique: true }); Note.createIndex('userId'); +Note.createIndex({ + createdAt: -1 +}); export default Note; export function isValidText(text: string): boolean { -- cgit v1.2.3-freya