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