mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-09-07 07:03:21 +00:00
Ignore the migrate if u2f_registration is not exist (#18760)
This commit is contained in:
parent
27af864cc2
commit
581a563cac
1 changed files with 8 additions and 0 deletions
|
@ -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…
Reference in a new issue