gitea/models/migrations/v172.go
zeripath cd79fbf94a
v172 migration adds created_unix field instead of expiry ()
The Session table must have an Expiry field not a created_unix field - somehow
this migration adds the incorrect named field leading to  reports.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-04-13 20:04:17 -04:00

20 lines
450 B
Go

// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package migrations
import (
"code.gitea.io/gitea/modules/timeutil"
"xorm.io/xorm"
)
func addSessionTable(x *xorm.Engine) error {
type Session struct {
Key string `xorm:"pk CHAR(16)"`
Data []byte `xorm:"BLOB"`
Expiry timeutil.TimeStamp
}
return x.Sync2(new(Session))
}