Skip to content

Commit 1ec3af7

Browse files
committed
Add index for event listener log
1 parent 03589e6 commit 1ec3af7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

api/pkg/entities/event_listener_log.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
// EventListenerLog stores the log of all the events handled
1010
type EventListenerLog struct {
1111
ID uuid.UUID `json:"id" gorm:"primaryKey;type:uuid;"`
12-
EventID string `json:"event_id"`
12+
EventID string `json:"event_id" gorm:"uniqueIndex:idx_event_listener_log_event_id_handler"`
1313
EventType string `json:"event_type"`
14-
Handler string `json:"handler"`
14+
Handler string `json:"handler" gorm:"uniqueIndex:idx_event_listener_log_event_id_handler"`
1515
Duration time.Duration `json:"duration"`
1616
HandledAt time.Time `json:"handled_at"`
1717
CreatedAt time.Time `json:"created_at"`

0 commit comments

Comments
 (0)