From b0fcb44902862f2090a9f66589c26411b3ac0a6a Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 25 Oct 2024 14:10:17 +0200 Subject: [PATCH] chore: adding an index to the entity_ref column Signed-off-by: blam --- .../20241024104700_add_entity_ref_to_final_entities.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/catalog-backend/migrations/20241024104700_add_entity_ref_to_final_entities.js b/plugins/catalog-backend/migrations/20241024104700_add_entity_ref_to_final_entities.js index b68bf1d7ef..40d07a6860 100644 --- a/plugins/catalog-backend/migrations/20241024104700_add_entity_ref_to_final_entities.js +++ b/plugins/catalog-backend/migrations/20241024104700_add_entity_ref_to_final_entities.js @@ -28,6 +28,8 @@ exports.up = async function up(knex) { .comment( 'The entity reference of the entity that was created from the catalog processing', ); + + table.index('entity_ref', 'entity_ref_idx'); }); await knex @@ -53,6 +55,7 @@ exports.up = async function up(knex) { */ exports.down = async function down(knex) { await knex.schema.alterTable('final_entities', table => { + table.dropIndex('entity_ref_idx'); table.dropColumn('entity_ref'); }); };