code.gitea.io/gitea@v1.21.7/models/migrations/v1_14/v172.go (about)

     1  // Copyright 2020 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package v1_14 //nolint
     5  
     6  import (
     7  	"code.gitea.io/gitea/modules/timeutil"
     8  
     9  	"xorm.io/xorm"
    10  )
    11  
    12  func AddSessionTable(x *xorm.Engine) error {
    13  	type Session struct {
    14  		Key    string `xorm:"pk CHAR(16)"`
    15  		Data   []byte `xorm:"BLOB"`
    16  		Expiry timeutil.TimeStamp
    17  	}
    18  	return x.Sync(new(Session))
    19  }