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

pull/18718/head^2
Lunny Xiao 3 years ago committed by GitHub
parent 27af864cc2
commit 581a563cac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      models/migrations/v209.go

@ -78,6 +78,14 @@ func increaseCredentialIDTo410(x *xorm.Engine) error {
return nil 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 // Now migrate the old u2f registrations to the new format
type u2fRegistration struct { type u2fRegistration struct {
ID int64 `xorm:"pk autoincr"` ID int64 `xorm:"pk autoincr"`

Loading…
Cancel
Save