Skip to content

Commit 86a0624

Browse files
committed
fix: updated create-applicant seeding
1 parent 3b9b257 commit 86a0624

File tree

4 files changed

+1
-19
lines changed

4 files changed

+1
-19
lines changed

backend/typescript/migrations/2025.07.21T07.02.40.create-applicants.ts renamed to backend/typescript/migrations/2025.07.21T07.02.41.create-applicants.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
import { DataType } from "sequelize-typescript";
22
import { v4 as uuidv4 } from "uuid";
33
import { Migration } from "../umzug";
4-
import allApplications from "./applicationlist.json";
54
import applicants from "./separateJSONs";
65

76
const TABLE_NAME = "applicants";
87

9-
// Converts timesApplied string to integer
10-
const convertTimesApplied: { [key: string]: number } = {
11-
"This is my first time!": 0,
12-
Once: 1,
13-
Twice: 2,
14-
"3 or more": 3,
15-
};
16-
17-
const MAX_SHORT_ANSWER_LENGTH = 255;
18-
198
export const up: Migration = async ({ context: sequelize }) => {
209
await sequelize.getQueryInterface().createTable(TABLE_NAME, {
2110
id: {
@@ -87,10 +76,6 @@ export const up: Migration = async ({ context: sequelize }) => {
8776
type: DataType.DATE,
8877
allowNull: false,
8978
},
90-
test: {
91-
type: DataType.BOOLEAN,
92-
defaultValue: false,
93-
},
9479
});
9580
await sequelize.getQueryInterface().bulkInsert(TABLE_NAME, applicants);
9681
};

backend/typescript/migrations/2025.06.24T18.20.15.create-reviewed-application.ts renamed to backend/typescript/migrations/2025.07.24T18.20.15.create-reviewed-application.ts

File renamed without changes.

backend/typescript/migrations/separateJSONs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function generateDeterministicId(app: any, index: number): string {
2929
}
3030

3131
export default allApplications.map((app, index) => ({
32-
id: generateDeterministicId(app, index),
32+
id: index.toString(),
3333
academicOrCoop: app.academicOrCoop || "",
3434
academicYear: app.academicYear || "",
3535
email: app.email || "",

backend/typescript/models/applicant.model.ts

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

5454
@Column({ type: DataType.DATE })
5555
submittedAt!: Date;
56-
57-
@Column({ type: DataType.BOOLEAN, defaultValue: false })
58-
test!: boolean;
5956
}

0 commit comments

Comments
 (0)