diff --git a/models/notifications.go b/models/notifications.go index 39fc792d..84489a7c 100644 --- a/models/notifications.go +++ b/models/notifications.go @@ -185,11 +185,11 @@ type NotificationSilence struct { Namespace string `json:"namespace,omitempty"` Name string `json:"name,omitempty"` Filter types.CelExpression `json:"filter,omitempty"` - From time.Time `json:"from"` - Until time.Time `json:"until"` + From *time.Time `json:"from,omitempty"` + Until *time.Time `json:"until,omitempty"` Source string `json:"source"` Recursive bool `json:"recursive"` - Description string `json:"description,omitempty"` + Description *string `json:"description,omitempty"` CreatedBy *uuid.UUID `json:"created_by,omitempty"` CreatedAt time.Time `json:"created_at" time_format:"postgres_timestamp" gorm:"<-:false"` UpdatedAt time.Time `json:"updated_at" time_format:"postgres_timestamp" gorm:"<-:false"` diff --git a/schema/notifications.hcl b/schema/notifications.hcl index 49eaf68a..0809646f 100644 --- a/schema/notifications.hcl +++ b/schema/notifications.hcl @@ -256,11 +256,11 @@ table "notification_silences" { type = text } column "from" { - null = false + null = true type = timestamptz } column "until" { - null = false + null = true type = timestamptz } column "recursive" {