summaryrefslogtreecommitdiff
path: root/packages/backend/migration
diff options
context:
space:
mode:
authoranatawa12 <anatawa12@icloud.com>2025-05-06 20:15:26 +0900
committerGitHub <noreply@github.com>2025-05-06 20:15:26 +0900
commit406406328c094c49fb88ea1726dc164185f48067 (patch)
tree39bbe70a6022328c209c2cb7878ba25b650893c6 /packages/backend/migration
parentfix: developのtypecheckエラーを修正 (#15967) (diff)
downloadmisskey-406406328c094c49fb88ea1726dc164185f48067.tar.gz
misskey-406406328c094c49fb88ea1726dc164185f48067.tar.bz2
misskey-406406328c094c49fb88ea1726dc164185f48067.zip
Fix 1745378064470-composite-note-index.js (#15968)
Diffstat (limited to 'packages/backend/migration')
-rw-r--r--packages/backend/migration/1745378064470-composite-note-index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/backend/migration/1745378064470-composite-note-index.js b/packages/backend/migration/1745378064470-composite-note-index.js
index 1487aa9630..12108a6b3c 100644
--- a/packages/backend/migration/1745378064470-composite-note-index.js
+++ b/packages/backend/migration/1745378064470-composite-note-index.js
@@ -14,7 +14,7 @@ export class CompositeNoteIndex1745378064470 {
if (concurrently) {
const hasValidIndex = await queryRunner.query(`SELECT indisvalid FROM pg_index INNER JOIN pg_class ON pg_index.indexrelid = pg_class.oid WHERE pg_class.relname = 'IDX_724b311e6f883751f261ebe378'`);
- if (!hasValidIndex || hasValidIndex[0].indisvalid !== true) {
+ if (hasValidIndex.length === 0 || hasValidIndex[0].indisvalid !== true) {
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_724b311e6f883751f261ebe378"`);
await queryRunner.query(`CREATE INDEX CONCURRENTLY "IDX_724b311e6f883751f261ebe378" ON "note" ("userId", "id" DESC)`);
}