bug fix
This commit is contained in:
parent
ce393211cf
commit
6ecb61ac45
@ -23,4 +23,8 @@ func SyncTables() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = db.Instance.Sync2(&Sessions{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
11
server/models/session.go
Normal file
11
server/models/session.go
Normal file
@ -0,0 +1,11 @@
|
||||
package models
|
||||
|
||||
type Sessions struct {
|
||||
Token string `xorm:"token char(43) not null pk " json:"token"`
|
||||
Data string `xorm:"data blob" json:"data"`
|
||||
Expiry int `xorm:"expiry timestamp index" json:"expiry"`
|
||||
}
|
||||
|
||||
func (p *Sessions) TableName() string {
|
||||
return "sessions"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user