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:
parent
0a604285a0
commit
7a41cfe28b
3 changed files with 23 additions and 1 deletions
|
|
@ -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.',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue