We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce39321 commit 6ecb61aCopy full SHA for 6ecb61a
server/models/base.go
@@ -23,4 +23,8 @@ func SyncTables() {
23
if err != nil {
24
panic(err)
25
}
26
+ err = db.Instance.Sync2(&Sessions{})
27
+ if err != nil {
28
+ panic(err)
29
+ }
30
server/models/session.go
@@ -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