summaryrefslogtreecommitdiffstats
path: root/models/migrations/v65.go
blob: f73e632877119eebfb0c6df26184ab015d3b66d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package migrations

import (
	"code.gitea.io/gitea/modules/util"
	"github.com/go-xorm/xorm"
)

func addU2FReg(x *xorm.Engine) error {
	type U2FRegistration struct {
		ID          int64 `xorm:"pk autoincr"`
		Name        string
		UserID      int64 `xorm:"INDEX"`
		Raw         []byte
		Counter     uint32
		CreatedUnix util.TimeStamp `xorm:"INDEX created"`
		UpdatedUnix util.TimeStamp `xorm:"INDEX updated"`
	}
	return x.Sync2(&U2FRegistration{})
}