From 90f076d1bcf5d306ddde1333f902f3f6de5e8413 Mon Sep 17 00:00:00 2001 From: Menci Date: Sun, 21 Apr 2019 01:00:14 +0800 Subject: [PATCH] Fix no default value for judge_state's some columns --- models/judge_state.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/models/judge_state.ts b/models/judge_state.ts index a3673c9..9780ff2 100644 --- a/models/judge_state.ts +++ b/models/judge_state.ts @@ -31,19 +31,19 @@ export default class JudgeState extends Model { task_id: string; @TypeORM.Index() - @TypeORM.Column({ nullable: true, type: "integer" }) + @TypeORM.Column({ nullable: true, type: "integer", default: 0 }) score: number; - @TypeORM.Column({ nullable: true, type: "integer" }) + @TypeORM.Column({ nullable: true, type: "integer", default: 0 }) total_time: number; - @TypeORM.Column({ nullable: true, type: "integer" }) + @TypeORM.Column({ nullable: true, type: "integer", default: 0 }) code_length: number; - @TypeORM.Column({ nullable: true, type: "boolean" }) + @TypeORM.Column({ nullable: true, type: "boolean", default: 0 }) pending: boolean; - @TypeORM.Column({ nullable: true, type: "integer" }) + @TypeORM.Column({ nullable: true, type: "integer", default: 0 }) max_memory: number; @TypeORM.Column({ nullable: true, type: "json" })