Skip to content

Commit

Permalink
Rename tmb column
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithriel committed Nov 29, 2024
1 parent f0d452f commit 23615bc
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/models/reports/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ module.exports = (sequelize, Sq) => {
field: 'hrdetect_score',
type: Sq.FLOAT,
},
intersectTmbScore: {
name: 'intersectTmbScore',
field: 'intersect_tmb_score',
genomeTmb: {
name: 'genomeTmb',
field: 'genome_tmb',
type: Sq.FLOAT,
},
alternateIdentifier: {
Expand Down
15 changes: 15 additions & 0 deletions migrations/20241129212739-DEVSU-2513-rename-tbm-score.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const TABLE = 'reports';

module.exports = {
up: (queryInterface) => {
return queryInterface.sequelize.transaction(async (transaction) => {
return Promise.all([
queryInterface.renameColumn(TABLE, 'intersect_tmb_score', 'genome_tmb', {transaction})

Check failure on line 7 in migrations/20241129212739-DEVSU-2513-rename-tbm-score.js

View workflow job for this annotation

GitHub Actions / eslint

Missing trailing comma
]);
});
},

down: () => {
throw new Error('Not Implemented!');
},
};
2 changes: 1 addition & 1 deletion test/routes/report/report.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const checkReport = (report) => {
'biopsyDate', 'biopsyName', 'presentationDate', 'kbDiseaseMatch',
'kbUrl', 'pediatricIds', 'captiv8Score', 'appendix', 'hrdetectScore',
'legacyReportFilepath', 'legacyPresentationFilepath', 'signatures',
'intersectTmbScore',
'genomeTmb',
].forEach((element) => {
expect(report).toHaveProperty(element);
});
Expand Down
2 changes: 1 addition & 1 deletion test/routes/report/reportAsync.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const checkReport = (report) => {
'state', 'expression_matrix', 'alternateIdentifier', 'ageOfConsent',
'biopsyDate', 'biopsyName', 'presentationDate', 'kbDiseaseMatch',
'kbUrl', 'pediatricIds', 'captiv8Score', 'hrdetectScore', 'appendix',
'intersectTmbScore',
'genomeTmb',
].forEach((element) => {
expect(report).toHaveProperty(element);
});
Expand Down

0 comments on commit 23615bc

Please sign in to comment.