1
0
Fork 1
mirror of https://example.com synced 2024-11-23 00:06:38 +09:00
firefish/packages/backend/migration-neko/1708872574733-index-alt-text-and-cw.js
naskya 949084e218
feat: search posts by cw and alt texts
Co-authored-by: sup39 <dev@sup39.dev>
2024-02-26 02:48:45 +09:00

17 lines
627 B
JavaScript

export class IndexAltTextAndCw1708872574733 {
name = "IndexAltTextAndCw1708872574733";
async up(queryRunner) {
await queryRunner.query(
`CREATE INDEX "IDX_8e3bbbeb3df04d1a8105da4c8f" ON "note" USING "pgroonga" ("cw" pgroonga_varchar_full_text_search_ops_v2)`,
);
await queryRunner.query(
`CREATE INDEX "IDX_f4f7b93d05958527300d79ac82" ON "drive_file" USING "pgroonga" ("comment" pgroonga_varchar_full_text_search_ops_v2)`,
);
}
async down(queryRunner) {
await queryRunner.query(`DROP INDEX "IDX_f4f7b93d05958527300d79ac82"`);
await queryRunner.query(`DROP INDEX "IDX_8e3bbbeb3df04d1a8105da4c8f"`);
}
}