From 2a1c96db671a2a7062644c9a6992533419743bdc Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Wed, 13 Nov 2024 10:32:29 +0545 Subject: [PATCH] feat: error in notification silence --- models/notifications.go | 3 +++ schema/notifications.hcl | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/models/notifications.go b/models/notifications.go index 80b4b972..3589b55d 100644 --- a/models/notifications.go +++ b/models/notifications.go @@ -167,6 +167,9 @@ type NotificationSilence struct { CreatedAt time.Time `json:"created_at" time_format:"postgres_timestamp" gorm:"<-:false"` UpdatedAt time.Time `json:"updated_at" time_format:"postgres_timestamp" gorm:"<-:false"` DeletedAt *time.Time `json:"deleted_at,omitempty"` + + // Error contains cel expression error in the filter + Error *string `json:"error,omitempty"` } func (n NotificationSilence) AsMap(removeFields ...string) map[string]any { diff --git a/schema/notifications.hcl b/schema/notifications.hcl index adadf82e..8e33c15e 100644 --- a/schema/notifications.hcl +++ b/schema/notifications.hcl @@ -226,6 +226,10 @@ table "notification_silences" { null = true type = text } + column "error" { + null = true + type = text + } column "from" { null = false type = timestamptz