]> source.dussan.org Git - gitea.git/commitdiff
v172 migration adds created_unix field instead of expiry (#15458) (#15463)
authortechknowlogick <techknowlogick@gitea.io>
Wed, 14 Apr 2021 06:03:42 +0000 (02:03 -0400)
committerGitHub <noreply@github.com>
Wed, 14 Apr 2021 06:03:42 +0000 (08:03 +0200)
The Session table must have an Expiry field not a created_unix field - somehow
this migration adds the incorrect named field leading to #15445 reports.

Fix #15445

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
models/migrations/v172.go

index 51f83bcc912a4b955ac8e0b72d2dcee59f4f7f28..125522a4b8ea1a6ec25e11504f3228281b0b8ec5 100644 (file)
@@ -12,9 +12,9 @@ import (
 
 func addSessionTable(x *xorm.Engine) error {
        type Session struct {
-               Key         string `xorm:"pk CHAR(16)"`
-               Data        []byte `xorm:"BLOB"`
-               CreatedUnix timeutil.TimeStamp
+               Key    string `xorm:"pk CHAR(16)"`
+               Data   []byte `xorm:"BLOB"`
+               Expiry timeutil.TimeStamp
        }
        return x.Sync2(new(Session))
 }