From 682f9a1f88e7ed157434d7da2f19dead0a58ed0a Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 20:04:41 -0500 Subject: [PATCH] Add index on source column for search_queries table (#10876) * Initial plan * Add migration to create index on source column for search_queries table Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> --- ...251213004745-add-search-queries-source-index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 server/migrations/20251213004745-add-search-queries-source-index.js diff --git a/server/migrations/20251213004745-add-search-queries-source-index.js b/server/migrations/20251213004745-add-search-queries-source-index.js new file mode 100644 index 0000000000..7d0fd52192 --- /dev/null +++ b/server/migrations/20251213004745-add-search-queries-source-index.js @@ -0,0 +1,14 @@ +"use strict"; + +/** @type {import('sequelize-cli').Migration} */ +module.exports = { + async up(queryInterface) { + await queryInterface.addIndex("search_queries", ["source"], { + concurrently: true, + }); + }, + + async down(queryInterface) { + await queryInterface.removeIndex("search_queries", ["source"]); + }, +};