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>
This commit is contained in:
饺子w (Yumechi) 2025-04-23 05:29:42 +00:00 committed by GitHub
parent 0a604285a0
commit 7a41cfe28b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 1 deletions

View file

@ -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.',