From 42a42d56251bd95e6ca030754ebdb1b5cb01d0b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Wed, 11 Mar 2026 11:06:57 +0100 Subject: [PATCH] fix: add JSDoc type annotation for MySQL orphan ID mapping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 Signed-off-by: Fredrik Adelöw --- .../migrations/20260214000000_search_fk_final_entities.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/catalog-backend/migrations/20260214000000_search_fk_final_entities.js b/plugins/catalog-backend/migrations/20260214000000_search_fk_final_entities.js index 1b483268b0..9c90567dfc 100644 --- a/plugins/catalog-backend/migrations/20260214000000_search_fk_final_entities.js +++ b/plugins/catalog-backend/migrations/20260214000000_search_fk_final_entities.js @@ -82,7 +82,9 @@ exports.up = async function up(knex) { if (orphanIds.length === 0) { break; } - const ids = orphanIds.map(r => r.entity_id); + const ids = orphanIds.map( + (/** @type {{ entity_id: string }} */ r) => r.entity_id, + ); await knex('search').whereIn('entity_id', ids).delete(); } @@ -165,7 +167,9 @@ exports.down = async function down(knex) { if (orphanIds.length === 0) { break; } - const ids = orphanIds.map(r => r.entity_id); + const ids = orphanIds.map( + (/** @type {{ entity_id: string }} */ r) => r.entity_id, + ); await knex('search').whereIn('entity_id', ids).delete(); }