From 5f15d4b3ba2d454caab66eed35e4ec51278e31e5 Mon Sep 17 00:00:00 2001 From: trivernis Date: Fri, 24 Jan 2020 15:17:15 +0100 Subject: [PATCH] Add not null contraint to media type --- src/lib/models/Media.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/models/Media.ts b/src/lib/models/Media.ts index 1d3a58d..cc5c62e 100644 --- a/src/lib/models/Media.ts +++ b/src/lib/models/Media.ts @@ -38,7 +38,8 @@ export class Media extends Model { /** * The type of media */ - @Column({type: sqz.ENUM, values: ["IMAGE", "VIDEO"]}) + @NotNull + @Column({type: sqz.ENUM, values: ["IMAGE", "VIDEO"], allowNull: false}) public type: MediaType; /**