Skip to content

Commit 943f9f6

Browse files
committed
adds isApplicantFlagged column to applicant_records table
1 parent 83b1a51 commit 943f9f6

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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
8+
.getQueryInterface()
9+
.addColumn(TABLE_NAME, "isApplicantFlagged", {
10+
type: DataType.BOOLEAN,
11+
allowNull: false,
12+
defaultValue: false,
13+
});
14+
};
15+
16+
export const down: Migration = async ({ context: sequelize }) => {
17+
await sequelize
18+
.getQueryInterface()
19+
.removeColumn(TABLE_NAME, "isApplicantFlagged");
20+
};

backend/typescript/models/applicantRecord.model.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,7 @@ export default class ApplicantRecord extends Model {
4747

4848
@Column({ type: DataType.JSONB, allowNull: true })
4949
extraInfo!: ApplicantRecordExtraInfo;
50+
51+
@Column({ type: DataType.BOOLEAN, defaultValue: false })
52+
isApplicantFlagged!: boolean;
5053
}

0 commit comments

Comments
 (0)