Skip to content

Commit e1fa9ce

Browse files
committed
make migration to add createdAt and updatedAt columns to applicant_records table
1 parent 6091978 commit e1fa9ce

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { DataType } from "sequelize-typescript";
2+
import { Migration } from "../umzug";
3+
4+
const TABLE_NAME = "applicant_records";
5+
6+
export const up: Migration = async ({ context: sequelize }) => {
7+
await sequelize.getQueryInterface().addColumn(TABLE_NAME, "createdAt", {
8+
type: DataType.DATE,
9+
allowNull: false,
10+
defaultValue: new Date(),
11+
});
12+
await sequelize.getQueryInterface().addColumn(TABLE_NAME, "updatedAt", {
13+
type: DataType.DATE,
14+
allowNull: false,
15+
defaultValue: new Date(),
16+
});
17+
};
18+
19+
export const down: Migration = async ({ context: sequelize }) => {
20+
await sequelize.getQueryInterface().removeColumn(TABLE_NAME, "createdAt");
21+
await sequelize.getQueryInterface().removeColumn(TABLE_NAME, "updatedAt");
22+
};

backend/typescript/services/implementations/applicantRecordService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ApplicantRecordService implements IApplicantRecordService {
2222
return {
2323
id: String(applicantRecord.id),
2424
applicantId: String(applicantRecord.applicantId),
25-
position: applicantRecord.position as PositionTitle,W
25+
position: applicantRecord.position as PositionTitle,
2626
roleSpecificQuestions: applicantRecord.roleSpecificQuestions,
2727
choice: applicantRecord.choice,
2828
status: applicantRecord.status,

0 commit comments

Comments
 (0)