mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 08:53:48 +01:00
Add index to improve user/notes endpoint performance
This commit is contained in:
parent
6d648b87d2
commit
2efdbae42e
@ -0,0 +1,10 @@
|
||||
export class IndexNoteUserId1695861526125 {
|
||||
name = "IndexNoteUserId1695861526125";
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`CREATE INDEX "IDX_note_userId_id" ON "note" ("userId", "id")`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`DROP INDEX "IDX_note_userId_id"`);
|
||||
}
|
||||
}
|
@ -16,6 +16,7 @@ import { Channel } from "./channel.js";
|
||||
@Index("IDX_NOTE_TAGS", { synchronize: false })
|
||||
@Index("IDX_NOTE_MENTIONS", { synchronize: false })
|
||||
@Index("IDX_NOTE_VISIBLE_USER_IDS", { synchronize: false })
|
||||
@Index("IDX_note_userId_id", ["userId", "id"])
|
||||
export class Note {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
Loading…
Reference in New Issue
Block a user