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