summaryrefslogtreecommitdiffstats
path: root/models/migrations/v172.go
blob: 51f83bcc912a4b955ac8e0b72d2dcee59f4f7f28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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"`
		CreatedUnix timeutil.TimeStamp
	}
	return x.Sync2(new(Session))
}