Skip to content

Commit f428132

Browse files
committed
add score columns to types
1 parent 6da3ca2 commit f428132

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

backend/typescript/migrations/20251004173612-update-db-with-scores-col.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
import { DataType } from "sequelize-typescript";
22
import { Migration } from "../umzug";
33

4+
const REV_APP_TABLE = "reviewed_applicant_records";
5+
const APP_TABLE = "applicant_records";
6+
47
export const up: Migration = async ({ context: sequelize }) => {
58
await sequelize
69
.getQueryInterface()
7-
.addColumn("reviewed_applicant_records", "combined_score", {
10+
.addColumn(REV_APP_TABLE, "combined_score", {
811
type: DataType.INTEGER,
912
allowNull: true,
1013
defaultValue: null,
1114
});
1215

13-
await sequelize.getQueryInterface().addColumn("applicant_records", "score", {
16+
await sequelize.getQueryInterface().addColumn(APP_TABLE, "score", {
1417
type: DataType.INTEGER,
1518
allowNull: true,
1619
defaultValue: null,

backend/typescript/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export type ApplicantRecordDTO = {
104104
choice: number;
105105
status: ApplicationStatus;
106106
skillCategory?: SkillCategory;
107+
score?: number | null;
107108
};
108109

109110
export type ApplicationStatus =
@@ -235,4 +236,5 @@ export type ReviewedApplicantRecordDTO = {
235236
reviewerId: number;
236237
review: Review;
237238
status: ReviewStatus;
239+
combined_score?: number | null;
238240
};

0 commit comments

Comments
 (0)