From 06461bb9ee6d579fceaaa700ed0b4167f3e00058 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 14 May 2018 09:15:43 +0900 Subject: NoteのuserIdに対してインデックスを張るように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/note.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/models/note.ts b/src/models/note.ts index 337711bcfa..f42bb2a49d 100644 --- a/src/models/note.ts +++ b/src/models/note.ts @@ -15,9 +15,8 @@ import Notification, { deleteNotification } from './notification'; import Following from './following'; const Note = db.get('notes'); - Note.createIndex('uri', { sparse: true, unique: true }); - +Note.createIndex('userId'); export default Note; export function isValidText(text: string): boolean { -- cgit v1.2.3-freya