gitea源码

v172.go 372B

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