From db3478a4731a398bd2fe2af4728ff0b1665309e5 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 27 Sep 2024 12:52:55 -0400 Subject: [PATCH] Probably don't need to index the comment count --- .../migrations/0870-video-comment-count.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/server/core/initializers/migrations/0870-video-comment-count.ts b/server/core/initializers/migrations/0870-video-comment-count.ts index 32a07546a..5c57b8194 100644 --- a/server/core/initializers/migrations/0870-video-comment-count.ts +++ b/server/core/initializers/migrations/0870-video-comment-count.ts @@ -101,24 +101,6 @@ async function up (utils: { defaultValue: 0 }, { transaction }) } - - { - // 5. Create the index - check if we are inside a transaction - const isInTransaction = !!transaction; - if (isInTransaction) { - // Create the index without 'concurrently' if in a transaction - await utils.queryInterface.addIndex('videoComment', ['videoId'], { - name: 'comments_video_id_idx', - transaction - }); - } else { - // Create the index concurrently if no transaction - await utils.queryInterface.addIndex('videoComment', ['videoId'], { - concurrently: true, - name: 'comments_video_id_idx' - }); - } - } } function down (options) {