add new note search file types (module, flash) and optimize file type query

This commit is contained in:
Hazelnoot 2025-02-13 09:28:46 -05:00
parent 5276d6024d
commit ed981a6970
8 changed files with 135 additions and 59 deletions

View file

@ -0,0 +1,12 @@
// https://stackoverflow.com/a/4059785
export class IndexNoteAttachedFileTypes1739451520729 {
name = 'IndexNoteAttachedFileTypes1739451520729'
async up(queryRunner) {
await queryRunner.query(`CREATE INDEX "IDX_NOTE_ATTACHED_FILE_TYPES" ON "note" USING GIN ("attachedFileTypes" array_ops)`);
}
async down(queryRunner) {
await queryRunner.query(`DROP INDEX "IDX_NOTE_ATTACHED_FILE_TYPES"`);
}
}