From 1497c063bb7714e633603b1752fd18b635c868d9 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 2 Dec 2020 01:47:43 +0300 Subject: fix: remove some schema restrictions --- lib/schema.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/schema.ts b/lib/schema.ts index 4e5dd69..1bba77d 100644 --- a/lib/schema.ts +++ b/lib/schema.ts @@ -6,15 +6,14 @@ export interface EventDocument extends Document { status: 'notStarted' | 'running' | 'complete' | 'failed'; error?: string; context: Context; - nextRunAt: Date; - lastRunAt: Date; + nextRunAt?: Date; + lastRunAt?: Date; } const createEventSchema = (contextSchema: Schema) => new Schema({ name: { type: String, - required: true, - unique: true + required: true }, schedule: { type: String, -- cgit v1.2.3