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 {
|
type Event struct {
|
||||||
ID int `xorm:"pk autoincr"`
|
ID int `xorm:"pk autoincr"`
|
||||||
Src *Src `xorm:"int src_id"`
|
Src *Src `xorm:"int src_id index"`
|
||||||
Host *Host `xorm:"int host_id"`
|
Host *Host `xorm:"int host_id index"`
|
||||||
IP *IP `xorm:"int ip_id"`
|
IP *IP `xorm:"int ip_id index"`
|
||||||
Created time.Time `xorm:"created notnull"`
|
Created time.Time `xorm:"created notnull"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,14 +5,11 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.paulbsd.com/paulbsd/ipbl/src/config"
|
"git.paulbsd.com/paulbsd/ipbl/src/config"
|
||||||
"xorm.io/xorm"
|
|
||||||
"xorm.io/xorm/names"
|
"xorm.io/xorm/names"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
x *xorm.Engine
|
tables []interface{}
|
||||||
tables []interface{}
|
|
||||||
|
|
||||||
HasEngine bool
|
HasEngine bool
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user