Skip to content

Commit 36e7198

Browse files
committed
fix(db): index processed field for performance
1 parent 093d625 commit 36e7198

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

message_acars.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type ACARSMessage struct {
2323
gorm.Model
2424
ProcessingStartedAt time.Time
2525
ProcessingFinishedAt time.Time
26-
Processed bool
26+
Processed bool `gorm:"index"`
2727

2828
// The rest of the struct is the actual message from ACARSHub
2929
FrequencyMHz float64 `json:"freq" ap:"FrequencyMHz"`

message_vdlm2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type VDLM2Message struct {
2626
gorm.Model
2727
ProcessingStartedAt time.Time
2828
ProcessingFinishedAt time.Time
29-
Processed bool
29+
Processed bool `gorm:"index"`
3030
// The rest of the struct is the actual message from ACARSHub
3131
VDL2 struct {
3232
App struct {

0 commit comments

Comments
 (0)