Fixed 267U.pre2

This commit is contained in:
2026-07-26 18:25:37 +09:00
parent 50bfaeafdf
commit 317d00a284
1286 changed files with 80222 additions and 1 deletions
@@ -0,0 +1,16 @@
export class NoteTextFtsIdx1700331070890 {
async up(queryRunner) {
await queryRunner.query(`CREATE EXTENSION IF NOT EXISTS pg_trgm`);
const total = await queryRunner.query(`SELECT COUNT(*) FROM "note"`);
if (total && total.length > 0) {
const count = BigInt(total[0].count);
console.log(`Indexing the "note" table for full text search, please hang tight!`);
console.log(`You have ${count} notes in your database. This process will take an estimated ${count / 1000000n * 45n} seconds, though the exact duration depends on your hardware configuration.`);
}
await queryRunner.query(`CREATE INDEX IF NOT EXISTS "note_text_fts_idx" ON "note" USING gin ("text" gin_trgm_ops)`);
}
async down(queryRunner) {
await queryRunner.query(`DROP INDEX IF EXISTS "note_text_fts_idx"`);
await queryRunner.query(`DROP EXTENSION IF EXISTS pg_trgm`);
}
}