diff options
| author | 饺子w (Yumechi) <35571479+eternal-flame-AD@users.noreply.github.com> | 2025-04-23 05:29:42 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-23 14:29:42 +0900 |
| commit | 7a41cfe28bf28daa32878ff3c77790242df1e0a3 (patch) | |
| tree | c66fbe1bbbb8f051fcbddcdd0e6d4c10008c97a7 /packages/backend/src/models | |
| parent | fix(deps): update dependency fastify to v5.3.2 [security] (#15866) (diff) | |
| download | sharkey-7a41cfe28bf28daa32878ff3c77790242df1e0a3.tar.gz sharkey-7a41cfe28bf28daa32878ff3c77790242df1e0a3.tar.bz2 sharkey-7a41cfe28bf28daa32878ff3c77790242df1e0a3.zip | |
enhance(backend): DB note (userId) インデクス -> (userId, id) 複合インデクスにする (#15879)
* enhance(backend): use composite index for ordering notes by user
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
* fixup! enhance(backend): use composite index for ordering notes by user
---------
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
Diffstat (limited to 'packages/backend/src/models')
| -rw-r--r-- | packages/backend/src/models/Note.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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.', |