From 7a41cfe28bf28daa32878ff3c77790242df1e0a3 Mon Sep 17 00:00:00 2001 From: "饺子w (Yumechi)" <35571479+eternal-flame-AD@users.noreply.github.com> Date: Wed, 23 Apr 2025 05:29:42 +0000 Subject: enhance(backend): DB note (userId) インデクス -> (userId, id) 複合インデクスにする (#15879) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enhance(backend): use composite index for ordering notes by user Signed-off-by: eternal-flame-AD * fixup! enhance(backend): use composite index for ordering notes by user --------- Signed-off-by: eternal-flame-AD --- packages/backend/src/models/Note.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/models/Note.ts b/packages/backend/src/models/Note.ts index 9a95c6faab..c5ca2b5776 100644 --- a/packages/backend/src/models/Note.ts +++ b/packages/backend/src/models/Note.ts @@ -10,6 +10,7 @@ import { MiUser } from './User.js'; import { MiChannel } from './Channel.js'; import type { MiDriveFile } from './DriveFile.js'; +@Index(['userId', 'id']) @Entity('note') export class MiNote { @PrimaryColumn(id()) @@ -65,7 +66,6 @@ export class MiNote { }) public cw: string | null; - @Index() @Column({ ...id(), comment: 'The ID of author.', -- cgit v1.2.3-freya