2018-05-19 08:12:37 -06:00
|
|
|
package migrations
|
|
|
|
|
|
|
|
import (
|
2019-08-15 08:46:21 -06:00
|
|
|
"code.gitea.io/gitea/modules/timeutil"
|
|
|
|
|
2018-05-19 08:12:37 -06:00
|
|
|
"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
|
2019-08-15 08:46:21 -06:00
|
|
|
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
|
|
|
|
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
|
2018-05-19 08:12:37 -06:00
|
|
|
}
|
|
|
|
return x.Sync2(&U2FRegistration{})
|
|
|
|
}
|