Skip to content

Commit 217e096

Browse files
committed
Ignore the migrate if u2f_registration is not exist
1 parent 27af864 commit 217e096

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

models/migrations/v209.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ func increaseCredentialIDTo410(x *xorm.Engine) error {
7878
return nil
7979
}
8080

81+
exist, err := x.IsTableExist("u2f_registration")
82+
if err != nil {
83+
return err
84+
}
85+
if !exist {
86+
return nil
87+
}
88+
8189
// Now migrate the old u2f registrations to the new format
8290
type u2fRegistration struct {
8391
ID int64 `xorm:"pk autoincr"`

0 commit comments

Comments
 (0)