2
0

Ignore the migrate if u2f_registration is not exist (#18760)

This commit is contained in:
Lunny Xiao
2022-02-14 16:13:17 +08:00
committed by GitHub
parent 678173324b
commit d2d75d81d9

View File

@@ -78,6 +78,14 @@ func increaseCredentialIDTo410(x *xorm.Engine) error {
return nil
}
exist, err := x.IsTableExist("u2f_registration")
if err != nil {
return err
}
if !exist {
return nil
}
// Now migrate the old u2f registrations to the new format
type u2fRegistration struct {
ID int64 `xorm:"pk autoincr"`