From 6538d6314c2cb5e87155bf1fb2e15e9758b08f51 Mon Sep 17 00:00:00 2001 From: Menci Date: Fri, 26 Apr 2019 11:12:33 +0800 Subject: [PATCH] Change comments_num default from NULL to 0 --- models/article.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/article.ts b/models/article.ts index 18ba0c7..a003c90 100644 --- a/models/article.ts +++ b/models/article.ts @@ -38,7 +38,7 @@ export default class Article extends Model { @TypeORM.Column({ nullable: true, type: "integer" }) sort_time: number; - @TypeORM.Column({ nullable: true, type: "integer" }) + @TypeORM.Column({ default: 0, type: "integer" }) comments_num: number; @TypeORM.Column({ default: true, type: "boolean" })