Skip to content

Commit 6ecb61a

Browse files
committed
bug fix
1 parent ce39321 commit 6ecb61a

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

server/models/base.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,8 @@ func SyncTables() {
2323
if err != nil {
2424
panic(err)
2525
}
26+
err = db.Instance.Sync2(&Sessions{})
27+
if err != nil {
28+
panic(err)
29+
}
2630
}

server/models/session.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package models
2+
3+
type Sessions struct {
4+
Token string `xorm:"token char(43) not null pk " json:"token"`
5+
Data string `xorm:"data blob" json:"data"`
6+
Expiry int `xorm:"expiry timestamp index" json:"expiry"`
7+
}
8+
9+
func (p *Sessions) TableName() string {
10+
return "sessions"
11+
}

0 commit comments

Comments
 (0)