Skip to content

Commit

Permalink
Merge pull request #401 from bcgsc/feature/DEVSU-2483-add-kb-match-in…
Browse files Browse the repository at this point in the history
…dexes

feature/DEVSU-2483-add-kb-match-indexes
  • Loading branch information
Nithriel authored Nov 12, 2024
2 parents 9c98300 + 78e4997 commit 92948e0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/models/reports/kbMatchJoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ module.exports = (sequelize, Sq) => {
},
},
},
indexes: [
{
name: 'idx_kb_match_id_join',
fields: ['kb_match_id'],
},
{
name: 'idx_kb_matched_statement_id_join',
fields: ['kb_matched_statement_id'],
},
],
},
);
};
14 changes: 14 additions & 0 deletions migrations/20241112211455-DEVSU-2483-add-kb-match-index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
up: async (queryInterface) => {
await queryInterface.addIndex('reports_kb_match_join', ['kb_match_id'], {
name: 'idx_kb_match_id_join',
});
await queryInterface.addIndex('reports_kb_match_join', ['kb_matched_statement_id'], {
name: 'idx_kb_matched_statement_id_join',
});
},

down: async () => {
throw new Error('Not Implemented!');
},
};

0 comments on commit 92948e0

Please sign in to comment.