added indices to event table
This commit is contained in:
parent
d7fcd209a4
commit
08f9378de8
@ -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"`
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user