added indices to event table
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Paul 2023-12-31 01:14:40 +01:00
parent d7fcd209a4
commit 08f9378de8
2 changed files with 4 additions and 7 deletions

View File

@ -29,9 +29,9 @@ func (event *Event) APIParse(session *xorm.Session, apievent APIEvent) (err erro
type Event struct {
ID int `xorm:"pk autoincr"`
Src *Src `xorm:"int src_id"`
Host *Host `xorm:"int host_id"`
IP *IP `xorm:"int ip_id"`
Src *Src `xorm:"int src_id index"`
Host *Host `xorm:"int host_id index"`
IP *IP `xorm:"int ip_id index"`
Created time.Time `xorm:"created notnull"`
}

View File

@ -5,14 +5,11 @@ import (
"fmt"
"git.paulbsd.com/paulbsd/ipbl/src/config"
"xorm.io/xorm"
"xorm.io/xorm/names"
)
var (
x *xorm.Engine
tables []interface{}
tables []interface{}
HasEngine bool
)