From 1868bb2ea498867d0c54ac5560820ab5e667efbe Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sat, 14 Jan 2023 17:30:42 +0100 Subject: [PATCH] misc update for develop-xorm --- src/models/ip.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/models/ip.go b/src/models/ip.go index d7f964e..b26b810 100644 --- a/src/models/ip.go +++ b/src/models/ip.go @@ -248,13 +248,13 @@ func (ip *APIIP) BeforeInsert() (err error) { type IP struct { ID int `xorm:"pk autoincr"` - IP string `xorm:"text notnull unique"` + IP string `xorm:"text notnull"` Rdns sql.NullString `xorm:"text default ''"` - AutonomousSystem *AutonomousSystem `xorm:"as_id int index default NULL"` - City *City `xorm:"city_id int index default NULL"` - Country *Country `xorm:"country_id int index default NULL"` - Src *Src `xorm:"src_id int index default NULL"` - Host *Host `xorm:"host_id int index default NULL"` + AutonomousSystem *AutonomousSystem `xorm:"as_id int index default null"` + City *City `xorm:"city_id int index default null"` + Country *Country `xorm:"country_id int index default null"` + Src *Src `xorm:"src_id int index default null"` + Host *Host `xorm:"host_id int index default null"` Whois string `xorm:"text index default null"` Created time.Time `xorm:"created notnull"` Updated time.Time `xorm:"updated notnull"`